Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Adding a method to an existing object

by forgot_other_usrname (Novice)
on Feb 13, 2012 at 02:40 UTC ( [id://953383]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Base;
    
    ...
    1;
    
    ...do the same for an AgeDecorator
    
  2. or download this
    use Base;
    use NameDecorator;
    ...
    my $decorated = AgeDecorator->new(NameDecorator->new(Base->new('id1'))
    +);
    $decorated->name('Edith');
    $decorated->age(93);
    
  3. or download this
    package NameProto;
    
    ...
    }
    
    1;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://953383]
Approved by Old_Gray_Bear
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: (2)
As of 2024-04-25 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found