develooper Front page | perl.perl6.language | Postings from February 2001

Re: Really auto autoloaded modules

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
February 2, 2001 08:20
Subject:
Re: Really auto autoloaded modules
Message ID:
5.0.2.1.0.20010202111321.01b23008@24.8.96.48
At 11:01 AM 2/2/2001 -0500, John Porter wrote:
>Dan Sugalski wrote:
> >
> > The last
> > thing I want is for every module to automagically export all (or even 
> some)
> > of its functions. That way lies namespace pollution *real* fast.
>
>I don't see why this is a concern.  Unless some explicit arrangement
>is made for CGI to export param (following the example), a call to
>unqualified param() in user code shouldn't find CGI::param,
>automagically loaded or otherwise.

It's the explicit exporting that I'm concerned about. Perhaps I'm being 
overly worried, but it strikes me that if all a module needs to do to get 
on the autoload list is have an @EXPORT_AUTO declaration at the top (or 
something similar) we're going to see it abused rather badly.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About