Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

TK Errors - maybe to do with version missmatch!

by blackadder (Hermit)
on Jul 07, 2004 at 10:10 UTC ( #372337=perlquestion: print w/ replies, xml ) Need Help??
blackadder has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks

I have this bit of code
#! c:/perl/bin -w $|++; AUTOLOAD; require 5.008; use strict; use warnings 'all'; use diagnostics; use TK 800.005; use Tk::TList; use TK::Table; use TK::Frame; use TK::DirTree; use TK::Adjuster; use TK::Scrollbar; use TK::DropSite; use TK::DragDrop;
that produced all those errors!
Subroutine Tk::optionAdd redefined at C:/Perl/site/lib/Tk/Submethods.p +m line 19 (#1) (W redefine) You redefined a subroutine. To suppress this warning +, say { no warnings 'redefine'; eval "sub name { ... }"; } Subroutine Tk::optionGet redefined at C:/Perl/site/lib/Tk/Submethods.p +m line 19 (#1) Subroutine Tk::optionClear redefined at C:/Perl/site/lib/Tk/Submethods +.pm line 19 (#1) Subroutine Tk::optionReadfile redefined at C:/Perl/site/lib/Tk/Submeth +ods.pm line 19 (#1) Subroutine Tk::clipboardClear redefined at C:/Perl/site/lib/Tk/Submeth +ods.pm line 19 (#1) Subroutine Tk::clipboardAppend redefined at C:/Perl/site/lib/Tk/Submet +hods.pm line 19 (#1) Subroutine _backTrace redefined at C:/Perl/site/lib/Tk.pm line 81 (#1) Subroutine BackTrace redefined at C:/Perl/site/lib/Tk.pm line 97 (#1) Subroutine __DIE__ redefined at C:/Perl/site/lib/Tk.pm line 116 (#1) Subroutine XEvent::xy redefined at C:/Perl/site/lib/Tk.pm line 125 (#1 +) Subroutine XEvent::AUTOLOAD redefined at C:/Perl/site/lib/Tk.pm line 1 +28 (#1) Subroutine NoOp redefined at C:/Perl/site/lib/Tk.pm line 135 (#1) Subroutine Ev redefined at C:/Perl/site/lib/Tk.pm line 138 (#1) Subroutine InitClass redefined at C:/Perl/site/lib/Tk.pm line 154 (#1) Subroutine Exists redefined at C:/Perl/site/lib/Tk.pm line 172 (#1) Subroutine Time_So_Far redefined at C:/Perl/site/lib/Tk.pm line 177 (# +1) Subroutine SelectionOwn redefined at C:/Perl/site/lib/Tk.pm line 184 ( +#1) Subroutine SelectionOwner redefined at C:/Perl/site/lib/Tk.pm line 189 + (#1) Subroutine SelectionClear redefined at C:/Perl/site/lib/Tk.pm line 194 + (#1) Subroutine SelectionExists redefined at C:/Perl/site/lib/Tk.pm line 19 +9 (#1) Subroutine SelectionHandle redefined at C:/Perl/site/lib/Tk.pm line 20 +4 (#1) Subroutine SplitString redefined at C:/Perl/site/lib/Tk.pm line 210 (# +1) Subroutine Methods redefined at C:/Perl/site/lib/Tk.pm line 222 (#1) Subroutine MessageBox redefined at C:/Perl/site/lib/Tk.pm line 233 (#1 +) Subroutine messageBox redefined at C:/Perl/site/lib/Tk.pm line 263 (#1 +) Subroutine getOpenFile redefined at C:/Perl/site/lib/Tk.pm line 270 (# +1) Subroutine getSaveFile redefined at C:/Perl/site/lib/Tk.pm line 275 (# +1) Subroutine chooseColor redefined at C:/Perl/site/lib/Tk.pm line 280 (# +1) Subroutine DialogWrapper redefined at C:/Perl/site/lib/Tk.pm line 285 +(#1) Subroutine ColorDialog redefined at C:/Perl/site/lib/Tk.pm line 315 (# +1) Subroutine FDialog redefined at C:/Perl/site/lib/Tk.pm line 321 (#1) Subroutine MainLoop redefined at C:/Perl/site/lib/Tk.pm line 334 (#1) Subroutine tkinit redefined at C:/Perl/site/lib/Tk.pm line 345 (#1) Subroutine catch redefined at C:/Perl/site/lib/Tk.pm line 349 (#1) Subroutine TranslateFileName redefined at C:/Perl/site/lib/Tk.pm line +357 (#1) Subroutine findINC redefined at C:/Perl/site/lib/Tk.pm line 371 (#1) Subroutine idletasks redefined at C:/Perl/site/lib/Tk.pm line 384 (#1) Subroutine Tk::BLACK redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::WHITE redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::NORMAL_BG redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::ACTIVE_BG redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::SELECT_BG redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::SELECT_FG redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::TROUGH redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::INDICATOR redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::DISABLED redefined at C:/Perl/site/lib/Tk.pm line 68 (# +1) Subroutine Tk::DONT_WAIT redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::WINDOW_EVENTS redefined at C:/Perl/site/lib/Tk.pm line +68 (#1) Subroutine Tk::FILE_EVENTS redefined at C:/Perl/site/lib/Tk.pm line 68 + (#1) Subroutine Tk::TIMER_EVENTS redefined at C:/Perl/site/lib/Tk.pm line 6 +8 (#1) Subroutine Tk::IDLE_EVENTS redefined at C:/Perl/site/lib/Tk.pm line 68 + (#1) Subroutine Tk::ALL_EVENTS redefined at C:/Perl/site/lib/Tk.pm line 68 +(#1) Subroutine Tk::Xrm::import redefined at C:/Perl/site/lib/Tk.pm line 68 + (#1) Subroutine XEvent::Info redefined at C:/Perl/site/lib/Tk.pm line 68 (# +1) Subroutine XEvent::DESTROY redefined at C:/Perl/site/lib/Tk.pm line 68 + (#1) Subroutine Tk::MainWindow::Synchronize redefined at C:/Perl/site/lib/T +k.pm line 68 (#1) Subroutine Tk::MainWindow::Count redefined at C:/Perl/site/lib/Tk.pm l +ine 68 (#1 ) Subroutine Tk::Callback::new redefined at C:/Perl/site/lib/Tk.pm line +68 (#1) Subroutine Tk::Callback::Substitute redefined at C:/Perl/site/lib/Tk.p +m line 68 (#1) Subroutine Tk::NeedPreload redefined at C:/Perl/site/lib/Tk.pm line 68 + (#1) Subroutine Tk::Preload redefined at C:/Perl/site/lib/Tk.pm line 68 (#1 +) Subroutine Tk::timeofday redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::GetFocusWin redefined at C:/Perl/site/lib/Tk.pm line 68 + (#1) Subroutine Tk::GetPointerCoords redefined at C:/Perl/site/lib/Tk.pm li +ne 68 (#1) Subroutine Tk::exit redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::CheckHash redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::Debug redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::WidgetMethod redefined at C:/Perl/site/lib/Tk.pm line 6 +8 (#1) Subroutine Tk::OldEnterMethods redefined at C:/Perl/site/lib/Tk.pm lin +e 68 (#1) Subroutine Tk::GetFILE redefined at C:/Perl/site/lib/Tk.pm line 68 (#1 +) Subroutine Tk::Widget::PointToWindow redefined at C:/Perl/site/lib/Tk. +pm line 68 (#1) Subroutine Tk::Widget::WindowXY redefined at C:/Perl/site/lib/Tk.pm li +ne 68 (#1) Subroutine Tk::Widget::DefineBitmap redefined at C:/Perl/site/lib/Tk.p +m line 68 (#1) Subroutine Tk::Widget::UnmanageGeometry redefined at C:/Perl/site/lib/ +Tk.pm line 68 (#1) Subroutine Tk::Widget::DisableButtonEvents redefined at C:/Perl/site/l +ib/Tk.pm line 68 (#1) Subroutine Tk::Widget::SendClientMessage redefined at C:/Perl/site/lib +/Tk.pm line 68 (#1) Subroutine Tk::Widget::XSync redefined at C:/Perl/site/lib/Tk.pm line +68 (#1) Subroutine Tk::Widget::GetRootCoords redefined at C:/Perl/site/lib/Tk. +pm line 68 (#1) Subroutine Tk::Widget::GetVRootGeometry redefined at C:/Perl/site/lib/ +Tk.pm line 68 (#1) Subroutine Tk::Widget::Colormap redefined at C:/Perl/site/lib/Tk.pm li +ne 68 (#1) Subroutine Tk::Widget::Display redefined at C:/Perl/site/lib/Tk.pm lin +e 68 (#1) Subroutine Tk::Widget::ScreenNumber redefined at C:/Perl/site/lib/Tk.p +m line 68 (#1) Subroutine Tk::Widget::Screen redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::Widget::Visual redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::Widget::WindowId redefined at C:/Perl/site/lib/Tk.pm li +ne 68 (#1) Subroutine Tk::Widget::X redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::Widget::Y redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::Widget::ReqWidth redefined at C:/Perl/site/lib/Tk.pm li +ne 68 (#1) Subroutine Tk::Widget::ReqHeight redefined at C:/Perl/site/lib/Tk.pm l +ine 68 (#1 ) Subroutine Tk::Widget::Width redefined at C:/Perl/site/lib/Tk.pm line +68 (#1) Subroutine Tk::Widget::Height redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::Widget::IsMapped redefined at C:/Perl/site/lib/Tk.pm li +ne 68 (#1) Subroutine Tk::Widget::Depth redefined at C:/Perl/site/lib/Tk.pm line +68 (#1) Subroutine Tk::Widget::InternalBorderWidth redefined at C:/Perl/site/l +ib/Tk.pm line 68 (#1) Subroutine Tk::Widget::IsTopLevel redefined at C:/Perl/site/lib/Tk.pm +line 68 (# 1) Subroutine Tk::Widget::Name redefined at C:/Perl/site/lib/Tk.pm line 6 +8 (#1) Subroutine Tk::Widget::PathName redefined at C:/Perl/site/lib/Tk.pm li +ne 68 (#1) Subroutine Tk::Widget::Class redefined at C:/Perl/site/lib/Tk.pm line +68 (#1) Subroutine Tk::Widget::MakeWindowExist redefined at C:/Perl/site/lib/T +k.pm line 68 (#1) Subroutine Tk::Widget::SetClass redefined at C:/Perl/site/lib/Tk.pm li +ne 68 (#1) Subroutine Tk::Widget::MoveWindow redefined at C:/Perl/site/lib/Tk.pm +line 68 (# 1) Subroutine Tk::Widget::XRaiseWindow redefined at C:/Perl/site/lib/Tk.p +m line 68 (#1) Subroutine Tk::Widget::MoveToplevelWindow redefined at C:/Perl/site/li +b/Tk.pm line 68 (#1) Subroutine Tk::Widget::MoveResizeWindow redefined at C:/Perl/site/lib/ +Tk.pm line 68 (#1) Subroutine Tk::Widget::ResizeWindow redefined at C:/Perl/site/lib/Tk.p +m line 68 (#1) Subroutine Tk::Widget::GeometryRequest redefined at C:/Perl/site/lib/T +k.pm line 68 (#1) Subroutine Tk::Widget::MaintainGeometry redefined at C:/Perl/site/lib/ +Tk.pm line 68 (#1) Subroutine Tk::Widget::SetGrid redefined at C:/Perl/site/lib/Tk.pm lin +e 68 (#1) Subroutine Tk::Widget::UnmaintainGeometry redefined at C:/Perl/site/li +b/Tk.pm line 68 (#1) Subroutine Tk::Widget::MapWindow redefined at C:/Perl/site/lib/Tk.pm l +ine 68 (#1 ) Subroutine Tk::Widget::UnmapWindow redefined at C:/Perl/site/lib/Tk.pm + line 68 ( #1) Subroutine Tk::Widget::UnsetGrid redefined at C:/Perl/site/lib/Tk.pm l +ine 68 (#1 ) Subroutine Tk::Widget::AddOption redefined at C:/Perl/site/lib/Tk.pm l +ine 68 (#1 ) Subroutine Tk::Widget::GetAtomName redefined at C:/Perl/site/lib/Tk.pm + line 68 ( #1) Subroutine Tk::Widget::ClearSelection redefined at C:/Perl/site/lib/Tk +.pm line 68 (#1) Subroutine Tk::Widget::DisplayName redefined at C:/Perl/site/lib/Tk.pm + line 68 ( #1) Subroutine Tk::Widget::GetOption redefined at C:/Perl/site/lib/Tk.pm l +ine 68 (#1 ) Subroutine Tk::Widget::InternAtom redefined at C:/Perl/site/lib/Tk.pm +line 68 (# 1) Subroutine Tk::Widget::Ungrab redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::Widget::SetAppName redefined at C:/Perl/site/lib/Tk.pm +line 68 (# 1) Subroutine Tk::Widget::IsWidget redefined at C:/Perl/site/lib/Tk.pm li +ne 68 (#1) Subroutine Tk::Widget::Grab redefined at C:/Perl/site/lib/Tk.pm line 6 +8 (#1) Subroutine Tk::Widget::Widget redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::Widget::Containing redefined at C:/Perl/site/lib/Tk.pm +line 68 (# 1) Subroutine Tk::Widget::Parent redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::Widget::MainWindow redefined at C:/Perl/site/lib/Tk.pm +line 68 (# 1) Subroutine Tk::AddErrorInfo redefined at C:/Perl/site/lib/Tk.pm line 6 +8 (#1) Subroutine Tk::BackgroundError redefined at C:/Perl/site/lib/Tk.pm lin +e 68 (#1) Subroutine Tk::Fail redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::DoOneEvent redefined at C:/Perl/site/lib/Tk.pm line 68 +(#1) Subroutine Tk::Font::DESTROY redefined at C:/Perl/site/lib/Tk.pm line +68 (#1) Subroutine Tk::Font::PostscriptFontName redefined at C:/Perl/site/lib/ +Tk.pm line 68 (#1) Subroutine Tk::abort redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::tainting redefined at C:/Perl/site/lib/Tk.pm line 68 (# +1) Subroutine Tk::tainted redefined at C:/Perl/site/lib/Tk.pm line 68 (#1 +) Subroutine Tk::DebugHook redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::ClearErrorInfo redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::Widget::BindClientMessage redefined at C:/Perl/site/lib +/Tk.pm line 68 (#1) Subroutine Tk::Widget::PassEvent redefined at C:/Perl/site/lib/Tk.pm l +ine 68 (#1 ) Subroutine Tk::Widget::SelectionGet redefined at C:/Perl/site/lib/Tk.p +m line 68 (#1) Subroutine Tk::MainWindow::Create redefined at C:/Perl/site/lib/Tk.pm +line 68 (# 1) Subroutine Tk::DoWhenIdle redefined at C:/Perl/site/lib/Tk.pm line 68 +(#1) Subroutine Tk::CreateGenericHandler redefined at C:/Perl/site/lib/Tk.p +m line 68 (#1) Subroutine Tk::Widget::ManageGeometry redefined at C:/Perl/site/lib/Tk +.pm line 68 (#1) Subroutine Tk::Interp::DESTROY redefined at C:/Perl/site/lib/Tk.pm lin +e 68 (#1) Subroutine Tk::bind redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::pack redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::grid redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::place redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::form redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::itemstyle redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::winfo redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::font redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::wm redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::grab redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::focus redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::event redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::property redefined at C:/Perl/site/lib/Tk.pm line 68 (# +1) Subroutine Tk::clipboard redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::bell redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::bindtags redefined at C:/Perl/site/lib/Tk.pm line 68 (# +1) Subroutine Tk::destroy redefined at C:/Perl/site/lib/Tk.pm line 68 (#1 +) Subroutine Tk::raise redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::lower redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::option redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::image redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::selection redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::tk_chooseColor redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::tk_getOpenFile redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::tk_getSaveFile redefined at C:/Perl/site/lib/Tk.pm line + 68 (#1) Subroutine Tk::tk_messageBox redefined at C:/Perl/site/lib/Tk.pm line +68 (#1) Subroutine Tk::tk redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::after redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::button redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::checkbutton redefined at C:/Perl/site/lib/Tk.pm line 68 + (#1) Subroutine Tk::label redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::message redefined at C:/Perl/site/lib/Tk.pm line 68 (#1 +) Subroutine Tk::_menu redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::radiobutton redefined at C:/Perl/site/lib/Tk.pm line 68 + (#1) Subroutine Tk::frame redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::toplevel redefined at C:/Perl/site/lib/Tk.pm line 68 (# +1) Subroutine Tk::update redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::tkwait redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) Subroutine Tk::configure redefined at C:/Perl/site/lib/Tk.pm line 68 ( +#1) Subroutine Tk::cget redefined at C:/Perl/site/lib/Tk.pm line 68 (#1) U:\scripts>
If I take out the diagnostics and warnings then all this will disappear! My question is; am I burying my head in the sand if I do so? Or is there away to remediate all those errors?

Also, I know that I am using Perl version 5.8.3 on WinXp, but how can I find out which version of TK I am using?

Finally: What is the significance of $|++? I was advised by a Monk here long ago to use it, However not sure exactly what it does?

Thanks a lot

* very sorry about the length of the error list!

Ahhhhhhhh, what an idiot, Capital T but small k....D'ohVery sorry for the disturbance!

Edit by tye, add READMORE

Comment on TK Errors - maybe to do with version missmatch!
Select or Download Code
Re: TK Errors - maybe to do with version missmatch!
by PERLscienceman (Curate) on Jul 07, 2004 at 10:33 UTC
    Also, I know that I am using Perl version 5.8.3 on WinXp, but how can I find out which version of TK I am using?

    Assuming that you are using a Build of Perl by ActiveState for Win32, simply type the following in on a command prompt to get the version of Tk that you are using:
    ppm query Tk

    What is the significance of $|++? I was advised by a Monk here long ago to use it, However not sure exactly what it does?

    In a nutshell, $| is a special variable that controls Perl's output buffer flushing; for a good explanation of the significance of $|++, please read the wise and insightful replies to the following node:
    What the heck does $|++; do?
      God bless you Brother.
      Blackadder
Re: TK Errors - maybe to do with version missmatch!
by gri6507 (Deacon) on Jul 07, 2004 at 12:57 UTC
    You can find out Tk version like this

    perl -e 'use Tk; print $Tk::VERSION'

    For my system, this outputs 800.024. Most packages have the VERSION variable defined, so you could do the same for other packages as well.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://372337]
Approved by Happy-the-monk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-07-30 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls