Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^6: inheritance: constructors (unless)

by tye (Cardinal)
on Dec 03, 2012 at 15:41 UTC ( #1006898=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    unless( $a ne $b ) {
    
  2. or download this
    if( $a eq $b ) {
    
    # or
    
    if( $a ne $b ) {
    
  3. or download this
        croak( "You must pass foo() a non-empty array ref" )
            unless  $arg  &&  'ARRAY' eq ref($arg)  &&  0 < @$arg;
    
  4. or download this
        croak( "You must pass foo() a non-empty array ref" )
            if  ! $arg  ||  'ARRAY' ne ref($arg)  ||  0 == @$arg;
    
  5. or download this
        croak( "You must pass foo() a non-empty array ref or hash ref" )
            unless  'ARRAY' eq ref($arg)  &&  0 < @$arg
                ||  'HASH'  eq ref($arg)  &&  0 < keys %$arg;
    
  6. or download this
        croak( "You must pass foo() a non-empty array ref or hash ref" )
            if(     (  'ARRAY' ne ref($arg)  ||  0 == @$arg  )
                &&  (  'HASH'  ne ref($arg)  ||  0 == keys %$arg  )
            );
    
  7. or download this
        croak( "You didn't pass foo() a reference" )
            if  ! $arg  ||  ! ref $arg;
    ...
                " ref (must be ARRAY or HASH)",
            );
        }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006898]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2014-07-26 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (179 votes), past polls