D
David Combs
Subject: an UN-deprecated way to cvt aryRef to size?
The line at 792 gives me a deprecated-error:
my $ary1Size = scalar(@{$ary1Ref});
<line 792>: @$ary2Ref->[$ary1Size-1] = undef; # PRE-ALLOCATE IT, ALL AT ONCE!
gives me the warning (I guess it's a warning):
1457 ==/dkcjunk==> perl -wc Dkclib.pm_02
Using an array as a reference is deprecated at Dkclib.pm_02 line 792.
Dkclib.pm_02 syntax OK
DOC-ERROR: The msg is backwards: actually, I'm using a ref as an array.
When I change it to this:
my $ary1Size = scalar(@{$ary1Ref});
# @$ary2Ref->[$ary1Size-1] = undef; # PRE-ALLOCATE IT, ALL AT ONCE!
$ary2Ref->[$ary1Size-1] = undef; # PRE-ALLOCATE IT, ALL AT ONCE!
I get no such message:
1458 ==/dkcjunk==> perl -wc Dkclib.pm
Dkclib.pm syntax OK
1459 ==/dkcjunk==>
Please, just what *is* the ("new" (as of 5.8.6?)) rule?
And, maybe that rule should be ADDED to the "error msg".
Thanks!
David
The line at 792 gives me a deprecated-error:
my $ary1Size = scalar(@{$ary1Ref});
<line 792>: @$ary2Ref->[$ary1Size-1] = undef; # PRE-ALLOCATE IT, ALL AT ONCE!
gives me the warning (I guess it's a warning):
1457 ==/dkcjunk==> perl -wc Dkclib.pm_02
Using an array as a reference is deprecated at Dkclib.pm_02 line 792.
Dkclib.pm_02 syntax OK
DOC-ERROR: The msg is backwards: actually, I'm using a ref as an array.
When I change it to this:
my $ary1Size = scalar(@{$ary1Ref});
# @$ary2Ref->[$ary1Size-1] = undef; # PRE-ALLOCATE IT, ALL AT ONCE!
$ary2Ref->[$ary1Size-1] = undef; # PRE-ALLOCATE IT, ALL AT ONCE!
I get no such message:
1458 ==/dkcjunk==> perl -wc Dkclib.pm
Dkclib.pm syntax OK
1459 ==/dkcjunk==>
Please, just what *is* the ("new" (as of 5.8.6?)) rule?
And, maybe that rule should be ADDED to the "error msg".
Thanks!
David