in reply to Re: Generic/Variable/Dynamic Subroutines? (Not a redefine) in thread Generic/Variable/Dynamic Subroutines? (Not a redefine)
Thanks for the explanation, I am relatively new to perl and my initial project was only reworking/enhancing existing code. Would you be able to elaborate, or comment, on the benefits of using autosplit for autoload, in that, placing any functions to be called by autoload after __END__ and having autosplit generate the *.al files necessary versus just having the functions inside of the package and having the appropriate method called during autoload? I was able to get both styles detailed, by shmem and Haukex, functional but didn't see any benefit from generating & using the *.al files, but found the simplest implementation was that detailed by shmem.
Re^3: Generic/Variable/Dynamic Subroutines? (Not a redefine) (updated)
by LanX (Saint) on Aug 21, 2017 at 17:17 UTC
|
> Would you be able to elaborate, or comment, on the benefits of using autosplit for autoload
If you are loading code from a slow disk autosplit is faster.
This used to be helpful 20 years ago. ...
Update
If compiling Perl code is slow, just autoloading on demand is faster
Again, this used to be helpful 20 years ago. ... ;)
| [reply] |
|
If compiling Perl code is slow, only autoloading on demand is faster
Again, this used to be helpful 20 years ago. ... ;)
Well, it is still useful for... what was the buzzword again? ah. "Continuous Integration" 'tis named I guess, if you replace AutoLoader with AutoReloader (PerlMonks thread). (yes, shameless plug :)
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
| [reply] |
|
I don't doubt there are still useful cases, I'm using AUTOLOAD a lot.
But autosplit was particularly useful when RAM, disk access and processor speed were bigger issues.
I'm reluctant to explain a newbie how to use a rocket instead of the bus.
| [reply] |
|
|
|