The qw(:standard) imports the standard CGI functions to your symbol table. This allows you to use CGI.pm in function oriented mode instead of object-oriented mode.use CGI qw(:standard);
That means you don't need to use the following:print header(-type=>'image/png'); # this works with qw(:standard)
Exporting many of the functions involves a fair amount of overhead with CGI.pm. In fact, it's enough overhead that the OO use of CGI.pm is often as fast as (or faster) than the function oriented use. However, since you're importing the functions and using the object-oriented syntax, I would change your use CGI qw(:standard) line to use CGI. You won't need to change any of your other code and you can stick with the OO syntax.print $query->header(-type=>'image/png'); # We don't need the OO versi +on
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to (Ovid) Re: a newbie to GD
by Ovid
in thread a newbie to GD
by tame1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |