Hi, On Tuesday 15 October 2002 13:23, Jesse Erlbaum wrote: > Hi Martijn -- > > > Reading the code for C::A I find that it imports _all_ functions > > and symbols > > from CGI.pm by default. > > It does? What gives you that impression? CGI::Application should be > importing NONE of the CGI.pm symbols! All use of CGI.pm in > CGI::Application is object-oriented, and optimized for use under mod_perl. > In these circumstance, importing symbols is unnecessary and very > undesirable. I agree. I stumbled upon this when I read that 'use CGI;' as written in CGI::Application, exports all defaults (ref. the Camel, p. 286), whereas 'use CGI();' exports nothing. > > In apps that don't use C::A I limit the number of exported > > functions/symbols > > with something like 'use CGI qw(:cgi);' to conserve resources. > > > > Is there a way to limit the amount of functions exported from CGI.pm via > > CGI::Application? > > AFAIK, CGI.pm does not export any symbols by default. Only if you specify > a tag in your "use" statement will methods be exported -- otherwise none > are. CGI::Application specifies no tag sets for import, so no symbols are > imported. I RTFM and think you're right. > > IOW, doing a "use CGI qw(:cgi);" consmes MORE resources than just "use > CGI;". Thanks for pointing me in the right direction and putting my mind at ease :) HAND, <Martijn/> --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/suppressed/ To unsubscribe, e-mail: suppressed For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.