Hi All,
Basically comes down to you cannot call the CGI.pm module in a
functional style within a block of code that is loaded at startup by a
mod-perl enabled web server.
Using CGI.pm in an OOP way eliminates the problem.
#######################################
# this code causes problems with the usage
# of CGI.pm with mod-perl
package NOGOOD;
require Exporter;
use strict;
use CGI qw/:standard/;
our (@ISA, @EXPORT);
our ($USERID, $PASSWORD, $select_list);
@ISA = qw(Exporter);
@EXPORT = qw($USERID $PASSWORD $select_list);
BEGIN{
$select_list = scrolling_list(-name=>'TEST',
-values=>[1,2,3,4],
-default=>'1',
-size=> 1);
}
1;
# END
#######################################
# this code WORKS
package GOOD;
require Exporter;
use strict;
use CGI;
our (@ISA, @EXPORT);
our ($USERID, $PASSWORD, $select_list);
@ISA = qw(Exporter);
@EXPORT = qw($USERID $PASSWORD $select_list);
BEGIN{
my $cgihandler = new CGI;
$select_list = $cgihandler->scrolling_list(-name=>'TEST',
-values=>[1,2,3,4],
-default=>'1',
-size=> 1);
}
1;
# END
I can't believe no-one else has run in to this. Something
to do with the default instantiation of CGI is my guess.
Thanks to all
Dave
--
Dave Morgan
[EMAIL PROTECTED]
403 399 2442