Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I think a better solution would simply be for Perl to completely ignore $a and $b with respect to "used only once" warnings. The biggest problem is: which $s & $b? That is, it is fairly easy to preempt the warnings for $main::a & $main::b -- by soemthing as simple as BEGIN{ $main::a || $main::b } somewhere in List::Util.pm; -- but if reduce() is called from some other package they won't be the right ones. Ie. If reduce() is called from package fred,then it'll be $fred::a & $fred::b. And there is no way to determine which package you were called from at BEGIN time. With this added to List::Util.pm:
The current package at BEGIN time is main for both of these:
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re^3: Eliminating "used only once" warnings from List::Util::reduce
by BrowserUk
|
|