Suppose I have a CGI script, not necessarily written in Perl, and I want to unit test that.
Of course, I can just use the web server and LWP :: UserAgent, but I think it's a bit overkill.
So how can I run a CGI program from perl? For instance. in pseudo code:
my $reply = fake_cgi("/path/to/prog.cgi", foo=>"bar", count=>1);
like ($reply->content, qr/<title>/, "Title is always present");
I found this advice , but I would prefer a ready-made module.
source
share