in reply to Re: Modules that do Less
in thread Modules that do Less

Having not read the code for CGI.pm, I'm wondering how this is done. Is this a Perl feature or do you have to do a huge amount of contortions to get this to happen?

Replies are listed 'Best First'.
Re: Re: Re: Modules that do Less
by stephen (Priest) on Jun 12, 2001 at 19:24 UTC
    A bit of both. CGI goes through huge contortions to do its version of autoloading, because Lincoln Stein is a very clever man who wanted to do things his way. However, using the SelfLoader is pretty simple; you put your functions after a '__DATA__' token and say 'use SelfLoader' at the top. The AutoLoader module is a bit more complicated, but can offer better results.

    stephen