On Wed, 02 Mar 2011 17:02:30 -0500, Shawn H Corey wrote: > On 11-03-02 04:15 PM, Parag Kalra wrote: >> A Perl script may have many functions. When we execute the script via >> Perl Interpreter, does all the functions are loaded into memory? >> >> > All the functions are compiled and loaded. > >> Sometimes we just like to keep the coded functions in the script with >> the idea that we may need them in future. Will removing an un-called >> functions improve the execution time? > > Yes but on modern machines, you will need an awful lot of subs to get a > noticeable slow down.
Right. > The AUTOLOAD feature can be used to delay the compilation and loading of > a sub I think you mean AutoLoader. Or SelfLoader. They may use AUTOLOAD under the hood but that's not the direction to point the user in. > but I have never seen it used in practice. There are a fair number of modules on CPAN using it. And in the core: POSIX, for instance. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/