Skip Menu |

This queue is for tickets about the Set-Array CPAN distribution.

Report information
The Basics
Id: 4626
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Set-Array

People
Owner: DJBERG [...] cpan.org
Requestors: Marek.Rouchal [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.10
Fixed in: (no value)



Subject: fix for deprecated warnings
Hello, I have perl-5.8.2 on Linux and Solaris; with Set-Array-0.10 I get warnings about a deprecated syntax (using array as reference). The patch below fixes this problem, and should be backward compatible with perls down to 5.005, as far as I can tell. Best regards, Marek --- Set-Array-0.10/Array.pm 2002-07-29 02:52:58.000000000 +0200 +++ Set-Array-0.10p1/Array.pm 2003-12-10 15:19:16.000000000 +0100 @@ -217,13 +217,13 @@ if( (want('OBJECT')) || (!defined wantarray) ){ for(my $n=0; $n<=$#$self; $n++){ - if( ref(@{$self}[$n]) eq 'ARRAY' ){ - CORE::splice(@{$self},$n,1,@{@{$self}->[$n]}); + if( ref($self->[$n]) eq 'ARRAY' ){ + CORE::splice(@{$self},$n,1,@{$self->[$n]}); $n--; next; } - if( ref(@{$self}[$n]) eq 'HASH' ){ - CORE::splice(@{$self},$n,1,%{@{$self}->[$n]}); + if( ref($self->[$n]) eq 'HASH' ){ + CORE::splice(@{$self},$n,1,%{$self->[$n]}); --$n; next; }
[MAREKR - Wed Dec 10 09:41:53 2003]: Show quoted text
> Hello, > > I have perl-5.8.2 on Linux and Solaris; with Set-Array-0.10 I get > warnings about a deprecated syntax (using array as reference). > The patch below fixes this problem, and should be backward > compatible with perls down to 5.005, as far as I can tell. > > Best regards, > > Marek
Thanks - will be applied to .12. Regards, Dan