Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Understanding the benefit of Given/When ...

by LanX (Canon)
on Mar 04, 2010 at 14:44 UTC ( #826710=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use feature "switch";
     
    ...
     
    # whats the point of implicit smartmatch if only scalars can be testet
    +??? smartmatchingan array is different
    print "\nBUT: def ~~ \@test!" if @test ~~ /def/;
    
  2. or download this
    === Given/When    
    GIVEN(abc):    abc    default    
    ...
    = GIVEN(\@test):
        whats tested is:    ARRAY(0x8a08a38)    default    
    BUT: def ~~ @test!
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://826710]
Approved by Corion
Front-paged by jrsimmon
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (18)
As of 2015-07-07 17:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (92 votes), past polls