NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Useful? Dunno (Score:1)
can_oneofandcan_someof. The third implementation prevented me of usingmy @a; for ( @_ ) { ...; push @a, ... }; return @ainstead of a proper map. This is it. Now insertUSUALinto the@ISAarray of the package to which belongs the object you are querying about. Yes, I resisted the sin of adding those methods intoUNIVERSAL.This asymmetrical implementation with a
forfor the scalar case and amapfor the list context made me want a method which did themapjob but got rid of theundefsand a scalar equivalent which returned the first defined result value. I reread the docs ofList::UtilandList::MoreUtilsbut they did not help me.With such methods, the implementation above would look like:
Now that's much more functional-stylish.
Reply to This