Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^5: Smartmatch alternatives

by davido (Archbishop)
on Dec 17, 2013 at 16:19 UTC ( #1067492=note: print w/ replies, xml ) Need Help??

in reply to Re^4: Smartmatch alternatives
in thread Smartmatch alternatives

Another good reason to run a recent Perl, I guess. ;) lol.

Funny, I thought it went back farther than that.


Comment on Re^5: Smartmatch alternatives
Replies are listed 'Best First'.
Re^6: Smartmatch alternatives
by tobyink (Abbot) on Dec 17, 2013 at 16:29 UTC

    The most recent stable release of Perl only comes with List::Util 1.27.

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

      Well, since I'm running Perl 5.18.2, I guess the fact that I have List::Util::any must mean that somewhere along the way I've installed the latest dual-lived version of the module.

      Anyway, is there any disagreement that "any" (under whichever banner it marches) is a reasonable utility for determining if any of the elements in an array meets some criteria? If I recall, it's also a PBP recommendation for the same reason I gave: That, unlike grep, it gives an appropriate and clear name to the functionality at work.


        Certainly no disagreement. The aforementioned match::simple even uses any.

        use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2015-10-10 01:38 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls