Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^6: inheritance: constructors (unless)

by tye (Sage)
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?
[Discipulus]: good morning shmem
[Discipulus]: test for pmcbtk
[Discipulus]: sometimes the client dies for extra content </chatter><span class="error" style="color: #cc0000">Server Error (Error ID 9162
[Discipulus]: the span is considered extra content by the parser
[Corion]: Mhmm - that would be some internal error, but I can't look into that right now as I don't have access to the logs from here ;)
[Discipulus]: ah, but it can be skipped by the client (?)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2017-07-25 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (364 votes). Check out past polls.