Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: Dynamically generate setter/getter methods [Updated]by pryrt (Abbot) |
on Dec 20, 2020 at 21:54 UTC ( [id://11125510]=note: print w/replies, xml ) | Need Help?? |
I learned and used the AUTOLOAD methodolgy for the first time when I was developing the Editor component for Win32::Mechanize::NotepadPlusPlus.
For that, I was mapping a pre-defined list of function prototypes I was If AUTOLOAD hadn't done what I wanted, I would have just manipulated the symbol table myself... but since AUTOLOAD was a feature of Perl that I hadn't explored, I wanted to see if I could make it work. In the end, AUTOLOAD wasn't that hard for me to learn, and it accomplished my goal pretty handily. I wouldn't call myself an AUTOLOAD expert, nor do I know all the times when it's benefits would really shine, but I found it a useful tool -- and now I have an example implementation that I should theoretically understand a few years down the road, the next time I want to try to AUTOLOAD.
In Section
Cool Uses for Perl
|
|