tanger has asked for the wisdom of the Perl Monks concerning the following question:
#!C:/Perl/bin/perl.exe -wT print "Content-type: text/html\n\n "; my $auth_file = 'auth.pl'; require "$auth_file"; &startup; my $action = $INPUT->param('action'); if (length($action) > 15) { print "Invalid Action! Your IP has been logged and will be inves +tigated further."; die; } if ($action eq "login") { &login; } elsif ($action eq "auth") { &auth; } elsif ($action eq "logout") { &logout; } else { &signup; }
I don't know why but the following set up just worries me? Shouldn't use strict be declared before use CGI?sub startup { use CGI qw/:standard/; #notice how theres no 'my' next to INPUT, so it can be global for the +user.pl to use $INPUT = new CGI; use strict; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using strict setup
by nobull (Friar) on Apr 16, 2005 at 08:57 UTC | |
|
Re: using strict setup
by Jaap (Curate) on Apr 16, 2005 at 08:58 UTC | |
|
Re: using strict setup
by tlm (Prior) on Apr 16, 2005 at 18:07 UTC |