in reply to Re: Automatic vivification of an object
in thread Automatic vivification of an object
Thanks for the tip about eval. I didn't know Perl allows method names to be called via string variables. I thought an eval was needed. So my updated version of that eval line is:
$_[0]->$AUTOLOAD(@_);As for prototypes, I tend to add them to method declarations as a form of minimal documentation to help me quickly understand what data types the method is expecting when I'm debugging code. (I also add more extensive POD and # comments, but the prototypes give me a quick snapshot.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Automatic vivification of an object
by LanX (Saint) on Jan 15, 2015 at 15:31 UTC | |
by bounsy (Acolyte) on Jan 15, 2015 at 16:30 UTC | |
by choroba (Cardinal) on Jan 15, 2015 at 16:59 UTC | |
by LanX (Saint) on Jan 15, 2015 at 20:42 UTC | |
|
Re^3: Automatic vivification of an object
by Athanasius (Cardinal) on Jan 15, 2015 at 15:58 UTC |