in reply to use CGI vs use CGI qw(:standard)

Sorry kiat, I can't answer technically what is happening, but though use CGI is a bit noisier, it is safer and I've stopped using the use CGI qw(:standard) altogether, based on Ovid's popular tutorial that has a great explanation about the two methods.

—Brad
"A little yeast leavens the whole dough."

Replies are listed 'Best First'.
Re: Re: use CGI vs use CGI qw(:standard)
by kiat (Vicar) on Apr 19, 2004 at 15:43 UTC
    Thanks, Brad!

    I changed it to 'use CGI'.

    There were problems at first because in my code I had lines such as 'print header' and 'my $action = param('query'). I think those caused the script to die. I changed the former to 'print $q->header' and the latter to '$action = $q->param('query') and the script works like before. cheers :)

      As Ovid points out in one portion of the tutorial.. one of the problems with use CGI qw(:standard); is namespace. The functions imported via the  :standard type would invalidate functions of the same name in the local file.

      Grygonos