I'd like to write some unit tests for my cgi script. I wrote my script as a modulino (script which could be a module depending on context) and I would like to test its functionality but also make sure that all parameters in query_string are set as they should.
I'd tried doing something like this:
$ENV{'QUERY_STRING'} = 'param1=some_param';
my $cgi = CGI->new;
print "param1= ".$cgi->param("param1")."\n";
But it seems to be completely ignoring that. Is there a way to set a query string without actually doing GET method?