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

Re^2: Generic/Variable/Dynamic Subroutines? (Not a redefine)

by mlewando (Initiate)
on Aug 21, 2017 at 17:10 UTC ( [id://1197748]=note: print w/replies, xml ) Need Help??


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.
  • Comment on Re^2: Generic/Variable/Dynamic Subroutines? (Not a redefine)

Replies are listed 'Best First'.
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. ... ;)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

      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'
        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.

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1197748]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-19 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found