[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cgiapp] Limiting number of exported symbols?


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.


> 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.

IOW, doing a "use CGI qw(:cgi);" consmes MORE resources than just "use
CGI;".


TTYL,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  suppressed
  Phone: 212-684-6161
  Fax: 212-684-6226



---------------------------------------------------------------------
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.