[sf-perl] Slides for "Evolving Tests"

Jeffrey Thalhammer jeff at imaginative-software.com
Thu Mar 26 13:49:24 PDT 2009


On Mar 26, 2009, at 1:02 PM, Joe Brenner wrote:

> How about his winning entry in the idiom contest?


I think they were something like this:

# Merge two hashes, allowing the latter hash to override values in the  
first.
# I sometimes use this to combine a hash of subroutine arguments with  
default values:
my %args = (%defaults, @_);


# Map one list of values to another, but only include "true" values.
# The trick is using the empty list () as opposed to undef:
my @output = map { frobulate($_) || () } @input;


Thanks for a great meeting everyone!

-Jeff




More information about the SanFrancisco-pm mailing list