taint has asked for the wisdom of the Perl Monks concerning the following question:
Simple enough --eh? NO. Seems that in the absence of M::P, everything is just Ducky. But now, with the addition of M::P, it fails.#!/usr/bin/perl -Tw # a stupid simple script that prints a form && echoes any input use CGI; use Modern::Perl 2011; my $head ='<!DOCTYPE html><head></head><body> <br /> <form method="post" action="/valid-form.cgi"> '; my $form =' <label for="input">Input: </label><input type="text" na +me="input" value="" /> <input type="submit" value="Post Input" /> '; my $foot =' </form></body></html>'; print "content-type:text/html; charset=utf-8\n\n"; print $head; print $form; my $query = CGI->new; $input = $query->param('input'); if (!$input) { print "<br />No input"; }else{ print "<br />$input"; } print $foot;
Hmm... the $input stuff is a near Copy->Paste from the CGI pod.Global symbol "$input" requires explicit package name at Global symbol "$input" requires explicit package name at Global symbol "$input" requires explicit package name at
#!/usr/bin/perl -Tw use perl::always; my $perl_version = (5.12.5); print $perl_version;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why does Modern::Perl hate CGI.pm || my simple form?
by choroba (Cardinal) on Nov 05, 2013 at 23:20 UTC | |
by taint (Chaplain) on Nov 05, 2013 at 23:38 UTC | |
|
Re: Why does Modern::Perl hate CGI.pm || my simple form?
by LanX (Saint) on Nov 05, 2013 at 23:21 UTC | |
by taint (Chaplain) on Nov 05, 2013 at 23:35 UTC | |
by taint (Chaplain) on Nov 05, 2013 at 23:47 UTC | |
|
Re: Why does Modern::Perl hate CGI.pm || my simple form?
by ww (Archbishop) on Nov 06, 2013 at 03:12 UTC | |
by taint (Chaplain) on Nov 06, 2013 at 04:40 UTC | |
by ww (Archbishop) on Nov 06, 2013 at 13:52 UTC | |
by taint (Chaplain) on Nov 06, 2013 at 16:11 UTC |