Subject: | [PATCH] Tk/Trace.pm: fix perl syntax |
Date: | Sat, 24 Feb 2007 15:42:10 +0300 |
To: | bug-tk [...] rt.cpan.org |
From: | Alexey Tourbin <at [...] altlinux.ru> |
Recent perl-5.8 snapshots (perl-5.8.9 to-be) no longer allow
$#{@ary} syntax.
http://www.nntp.perl.org/group/perl.perl5.porters/119879
http://www.nntp.perl.org/group/perl.perl5.porters/119881
http://www.nntp.perl.org/group/perl.perl5.porters/119882
http://www.nntp.perl.org/group/perl.perl5.porters/119883
---
Tk/Trace.pm | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Tk/Trace.pm b/Tk/Trace.pm
index 1e38e79..46695ed 100644
--- a/Tk/Trace.pm
+++ b/Tk/Trace.pm
@@ -49,7 +49,7 @@ sub fetch {
return $val unless $call->[0]; # if fetch inactive
my $final_val;
- foreach my $aref (reverse @$call[ 1 .. $#{@$call} ] ) {
+ foreach my $aref (reverse @$call[ 1 .. $#$call ] ) {
my ( @args_copy ) = @$aref;
my $sub = shift @args_copy; # user's callback
unshift @_, undef if scalar @_ == 0; # undef "index" for a scalar
@@ -86,7 +86,7 @@ sub store {
my $call = $TRACE{$aref->[0]}->[1]->{-store}; # active flag/callbacks
return $val unless $call->[0]; # if store inactive
- foreach my $aref ( reverse @$call[ 1 .. $#{@$call} ] ) {
+ foreach my $aref ( reverse @$call[ 1 .. $#$call ] ) {
my ( @args_copy ) = @$aref;
my $sub = shift @args_copy; # user's callback
unshift @_, undef if scalar @_ == 1; # undef "index" for a scalar
@@ -118,7 +118,7 @@ sub destroy {
my $call = $TRACE{$aref->[0]}->[1]->{-destroy}; # active flag/callbacks
return $val unless $call->[0]; # if destroy inactive
- foreach my $aref ( reverse @$call[ 1 .. $#{@$call} ] ) {
+ foreach my $aref ( reverse @$call[ 1 .. $#$call ] ) {
my ( @args_copy ) = @$aref;
my $sub = shift @args_copy; # user's callback
my $val = $self->Fetch(@_); # get final value
--
1.5.0.1.GIT