I've just recently come across what appears to me to be a bug with CGI::Simple. It comes up as missing form data. I've narrowed it down to the following small case. The first form submission works as expected, but any further submissions come up blank.
C:\Perl\site\lib> more MyPackage.pm package MyPackage; use strict; use CGI::Simple; require Exporter; use vars qw/@ISA @EXPORT $CGI/; @ISA = qw/Exporter/; @EXPORT = qw/init $CGI/; sub init { $CGI = CGI::Simple->new; } 1; C:\Apache2\www> more index.pl #!c:/perl/bin/perl -w use strict; use MyPackage; init(); print $CGI->header, '<html><body>'; print $CGI->param('text') if defined($CGI->param('text')); print <<'END_HTML'; <form action="index.pl" method="post" enctype="multipart/form-data"> <textarea name="text" rows="10" cols="70"></textarea> <input type='submit' /> </form> </body> </html> END_HTML
I also believe that this is an issue with CGI::Simple because if you replace the use of CGI::Simple with CGI, it works perfectly fine. My CGI.pm realizes it is running under mod_perl 2 ($CGI::MOD_PERL == 2), and I have commented out the necessary lines within CGI/Simple.pm for mod_perl compatibility. Any insights as to what CGI::Simple is doing wrong? Or is it just me?
In reply to CGI vs. CGI::Simple under mod_perl by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |