Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: add method at runtime

by roboticus (Chancellor)
on Jan 29, 2013 at 17:23 UTC ( #1015912=note: print w/replies, xml ) Need Help??


in reply to add method at runtime

Yes, it's possible. The reasons and benefits, however, vary with the type of task you're doing.

Generally, when you find the need to do it, you'll pretty much know the advantages. At that point, you probably need to contemplate the disadvantages as well, though. ;^)

Update: Check out How can I use AUTOLOAD to magically define get and set methods for my member data? for an example.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015912]
help
Chatterbox?
[stevieb]: I think that placing the * in C when dealing with pointers is akin to keeping separated the circumfix op from the inner ref in Perl: @{ $aref };, which is all personal preference. In perl, I'm good. C, don't know what I like
[stevieb]: ...yet. Still too newbie

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-01-24 02:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (200 votes). Check out past polls.