perl-tk
perl-tk copied to clipboard
errata Tk->findINC usage in demo instead of Tk->findINC
my /usr/lib/x86_64-linux-gnu/perl5/5.22/Tk.pm
shows to me:
sub findINC
{
my $file = join('/',@_);
my $dir;
$file =~ s,::,/,g;
foreach $dir (@INC)
{
my $path;
return $path if (-e ($path = "$dir/$file"));
}
return undef;
}
Since it has not the my $self = shift;
instruction at the beginning it seems to be used with :: operator, not with -> ;
however the 'demo' directory examples widely use the -> in fact:
$ cd /usr/lib/x86_64-linux-gnu/perl5/5.22/Tk/demos
$ grep -ri '>findINC' . | wc
37 195 3196
$ grep -ri ':findINC' . | wc
0 0 0
$
I suppose the bug is in demo files due findINC
shall be static as defined.