Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

What is autoloading?

by perlsyntax (Pilgrim)
on Nov 25, 2007 at 04:24 UTC ( [id://652789]=perlquestion: print w/replies, xml ) Need Help??

perlsyntax has asked for the wisdom of the Perl Monks concerning the following question:

What is Autoloading and what does it do?

Replies are listed 'Best First'.
Re: What is autoloading?
by chromatic (Archbishop) on Nov 25, 2007 at 05:04 UTC

    When Perl dispatches a method call, it may not find an appropriate method to invoke. In that case, it will dispatch to a special method called AUTOLOAD as a last resort. This allows you to do whatever's appropriate for your class in the case of a missing method.

    You can catch errors in this fashion or write really simple proxy or delegation systems. Some code uses this to compile code as necessary, but that's not really as useful in my opinion.

      Some code uses this to compile code as necessary, but that's not really as useful in my opinion.

      It is useful if you have a module with lots of functions, of which you will need only some, e.g. POSIX.

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: What is autoloading?
by TOD (Friar) on Nov 25, 2007 at 04:27 UTC
    perldoc perltoot
    --------------------------------
    masses are the opiate for religion.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found