in reply to Re: Warning for "unused sub declarations"?
in thread Warning for "unused sub declarations"?
How are we defining "really weird"? I think that this case is pretty weird, and happens with or without parens:
use strict; sub foo(\@;@) { shift; print @_, "\n"; }; my @arr1 = ( [1, 2], 2, 3 ); my @arr2 = (1, 2, 3); foo( @arr1, @arr2 ); &foo( @arr1, @arr2 ); __END__ 123 23123
I'll grant you that this example is tremendously cooked, but the issue is real. As you say, the OP might be unlikely to use such prototypes, but the OP is likely to be using the code of others.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Warning for "unused sub declarations"?
by jonadab (Parson) on May 20, 2005 at 20:44 UTC |