Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Is "ref($class) || $class" a bad thing?

by stvn (Monsignor)
on Jul 12, 2004 at 16:55 UTC ( [id://373660]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub new {
      my ($class) = @_;
    ...
              || die "Oh no you don't!!!!";  
      bless {}, $class;
    }
    
  2. or download this
    Foo::new();
    Foo::new("SomeOtherModuleName") ;
    Foo::new([]);
    Foo::new({});
    
  3. or download this
    sub new {
      my ($class) = @_;
    ...
                  || die "Oh no you don't!!!!";   
      bless {}, $class;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found