Skip Menu |

This queue is for tickets about the Tcl-pTk CPAN distribution.

Report information
The Basics
Id: 127529
Status: resolved
Priority: 0/
Queue: Tcl-pTk

Owner: CAC [...]
Requestors: welleozean [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.95

Subject: Tcl::pTk 0.94 Tk->findINC
Date: Tue, 30 Oct 2018 16:17:43 +0100
To: bug-Tcl-pTk [...]
From: welle Ozean <welleozean [...]>
Download (untitled) / with headers
text/plain 592b
Calling "Tk->findINC('.')" in the following line fires an error in some circumstances: # Tcl::pTk::libary variable: Translation from perl/tk {($Tcl::pTk::library) = __FILE__ =~ /^(.*)\.pm$/;} $Tcl::pTk::library = Tk->findINC('.') unless (defined($Tcl::pTk::library) && -d $Tcl::pTk::library); I solved it (at least there are no complaints anymore) changing the line into, but I am not quite sure that this is a correct patch: $Tcl::pTk::library = findINC('.') unless (defined($Tcl::pTk::library) && -d $Tcl::pTk::library); Note that there is a subroutine findINC in the same
Hi Welle, I apologize for overlooking this report for so long.

This looks a lot like the issue in a thread I had encountered on PerlMonks:

I haven't encountered the error myself, but indeed it looks like there was a mistake: the third line should have been changed to use


when it was originally copied from Perl/Tk. Using just findINC without Tk-> as you've tried is likely equivalent, but I think using Tcl::pTk->findINC would be more consistent.

I'm not sure under what conditions exactly that $Tcl::pTk::library doesn't get set by the second line, causing the unless … condition to be false on the line below it and in turn the Can't locate object method error, but I'm guessing they happen infrequently.

I have committed a fix for this:

I am finally trying to wrap up the Tcl::pTk 0.95 release and upload that any day now.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to