Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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 leaves swirl about...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-11-23 09:49 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (333 votes). Check out past polls.