Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 taking refuge in the Monastery: (1)
As of 2022-10-01 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (1 votes). Check out past polls.

    Notices?