There is a whole lot missing from that example, like two right braces at least. is switch supposed to be a label?
switch: { warn("manage_users.cgi line 54 '$action'"); #Request from User for Login Form ($action eq "GetLoginForm") && do { manageusers::OpenConnection(); } }
or a call to the switch method in CGI::Switch? http://search.cpan.org/~chips/perl5.004/lib/CGI/Switch.pm CGI::Switch - Try more than one constructors and return the first object available
my $q = new CGI::Switch;
Added:
or use of the plain switch module? http://search.cpan.org/~chorny/Switch-2.17/Switch.pm
I originally discounted this because of the lack of the switch constructs like case, but decided to add it toouse Switch; switch ($val) { case 1 { print "number 1" } case "a" { print "string a" } case [1..10,42] { print "number in list" } case (\@array) { print "number in list" } case /\w+/ { print "pattern" } case qr/\w+/ { print "pattern" } case (\%hash) { print "entry in hash" } case (\&sub) { print "arg to subroutine" } else { print "previous case not true" } }
In reply to Re: Switch.pm Failure
by huck
in thread Switch.pm Failure
by tultalk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |