Click to See Complete Forum and Search --> : CGI Module Query


edatz
02-18-2011, 05:05 AM
Out of interest, does

use CGI qw(:standard);

Use the entire CGI module or only just part of it?

All I'm thinking of using it for is passing params from one script or sub routine to another. I don't want to use the whole module if it is not needed.

Thanks for any input.

Jeff Mott
02-18-2011, 12:32 PM
It loads the entire module, and imports a subset of the functions into your namespace.

If you want a smaller module, CGI::Minimal (http://search.cpan.org/~snowhare/CGI-Minimal-1.29/lib/CGI/Minimal.pod) is a good choice.

edatz
02-18-2011, 02:57 PM
Hi Jeff, thanks. I'll have a look at that. The main reason is just to pass params, forms etc., I do myself. Using params is easier than using a form to pass values all the time (unless there's an easier way - dunno).

It's only once in a great while I use a module and that when there is really no other easy method (like LWP , MimeLite or Archive Zip).

I'm trying to address how I write scripts and want to make stuff more efficient. Have even (eee gads) begun using strict and warnings and tons of mys (big departure for me :) )