Prev Code Coverage - Tales From the Trenches Next

Writing new or improved tests

        # Program to do something sensible
        my $action = something_silly;  # default that will never happen
        if (situation_1)
        {
            $action = something_sensible_1;
        }
        elsif (situation_2)
        {
            $action = something_sensible_2;
        }
        $action->();


Slide 70 YAPC::Europe::2003 Copyright © 2003 Paul Johnson