Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: List::MoreUtils::first_value() question

by tqisjim (Beadle)
on Jul 30, 2013 at 16:33 UTC ( #1047065=note: print w/ replies, xml ) Need Help??

in reply to Re: List::MoreUtils::first_value() question
in thread List::MoreUtils::first_value() question

The blunt truth is that I'm trying to assemble a body of code to show potential employers. So maybe I should qualify my posts with the following:

  1. Acquiring an essential understanding of CPAN.
  2. Demonstrating best practices.
  3. Initiating best practices.

That last one requires that I fake it until I make it approach. Your recommendation strikes at the very heart of my metamorphosis.

Comment on Re^2: List::MoreUtils::first_value() question
Replies are listed 'Best First'.
Re^3: List::MoreUtils::first_value() question
by davido (Archbishop) on Jul 30, 2013 at 19:05 UTC

    Well then a best practice might be to use List::Util::first unless you are already using List::MoreUtils for something else, and not using List::Util for anything, in which case, use List::MoreUtils::firstval.

    I suggest this because it means you'll be sticking to a core module (List::Util), avoiding adding a CPAN dependency. However, if you're already using the CPAN dependency, and you're not using List::Util in the module, then there's no reason to use both modules; stick with List::MoreUtils.

    I say "might", because there are always "it depends" criteria, and best practices suggestions are rarely as simple as "just do it this way."


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1047065]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2015-10-04 20:09 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (104 votes), past polls