Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Overriding arguments in Class::Std superclass constructors

by fce2 (Sexton)
on Aug 29, 2006 at 08:08 UTC ( #570105=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub new {
        my ($class, $args) = @_;
        $args->{value} = 23;
        return $class->SUPER::new($args);
    }
    
  2. or download this
    sub PREBUILD {
        my ($class, $args) = @_;
        return { %{$args}, value => 23 };
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2022-08-12 22:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?