Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Eliminating "used only once" warnings from List::Util::reduce

by BrowserUk (Pope)
on Jul 30, 2013 at 13:45 UTC ( #1047030=note: print w/replies, xml ) Need Help??

in reply to Eliminating "used only once" warnings from List::Util::reduce

Just a thought.

If you tweak List::Util so:

use vars qw(@ISA @EXPORT_OK $VERSION $XS_VERSION $TESTING_PERL_ONLY $a + $b ); require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(first min max minstr maxstr reduce sum shuffle $a $b +);

Then you can import $a & $b so:

C:\test\primes>perl -Mstrict -MList::Util=reduce,$a,$b -wE" say reduce +{ $a +$b } 1,2,3" 6 C:\test\primes>perl -Mstrict -wE"package fred; use List::Util qw[ redu +ce $a $b ]; say reduce{ $a +$b } 1,2,3" 6

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1047030]
[Corion]: Hmm. My overkill logging of transactions seems to bear fruit. I've built it in a way that the decision on every transaction must be logged, even if the transaction is just skipped, to prevent silent skips.
[Corion]: Now, three years in production, it found a situation (during development) where stuff was skipped without getting a log message.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2017-08-21 07:46 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (318 votes). Check out past polls.