develooper Front page | perl.perl5.porters | Postings from April 2006

t/op/grep.t one-sided tests

Thread Next
David Landgren
April 29, 2006 05:37
t/op/grep.t one-sided tests
Message ID:
t/op/grep.t contains some oddities like:

    print map({$_} ("ok $test\n"));

    print map
             ({$_} ("ok $test\n"));

This is all very well if the tests succeed, but if they fail, the only 
indication will be that the test counts at the end of the run will be 
off by one (or how ever many), but you're on your own as to figuring out 
which test failed. What is being tested here? Is the following equivalent?

     my $orig = 'lazar';
     my ($result) = map({$_} ($orig));

(or maybe @result, if it's a question of scalar/list context?)

hope still, a little resistance always maybe stubborn tiny lights vs. 
clustering darkness forever ok?

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About