Your .pm file doesn't return true EOF. You should put 1; at the bottom of 
the .pm file 

On Fri, 10 May 2002, [utf-8] Morris, Katherine L. wrote:

> 
> I'm attempting to set up the cgi::application example widgetview.cgi and
> WidgetView.pm.  Here's the error I'm getting:
>  
> [Fri May 10 14:53:43 2002] [error] [client 172.16.11.135] [Fri May 10
> 14:53:43 2002] widgetview.cgi: BEGIN failed--compilation aborted at
> widgetview.cgi line 3.
>  
> Any ideas on what this error means?
> 
> Best I can figure is that there's something not working correctly in loading
> the .pm but a command line run produces no errors.  I'm running on Solaris8
> w/ perl 5.6.1 and apache server 2.0.35.  
>  
> Here's my code that I've tried to strip down as much as possible and still
> get to see something, but to no avail:
>  
> ###widgetview.cgi###
> #!/usr/local/bin/perl -w
>  
> use WidgetView;
> my $app = WidgetView->new();
> $app->run();
> print STDERR $app->dump();
>  
> ###WidgetView.pm###
> #!/usr/local/bin/perl
> 
>    package WidgetView;
>    use base 'CGI::Application';
> 
> sub setup {
>         my $self = shift;
>         $self->start_mode('mode1');
>         $self->run_modes(
>                 'mode1' => 'showform'
>         );
>         
> }
>  
> sub showform {
>         my $self = shift;
>         # Get CGI query object
>         my $q = $self->query();
>         my $output = '';
>         $output .= $q->header();
>         $output .= $q->start_html(-title => 'Widget Search Form');
>         $output .= $q->start_form();
>         $output .= $q->textfield(-name => 'widgetcode');
>         $output .= $q->hidden(-name => 'rm', -value => 'mode2');
>         $output .= $q->submit();
>         $output .= $q->end_form();
>         $output .= $q->end_html();
>         return $output;
> }
> 
> 
> 
>  
>  
> 
> ---------------------------------------------------------------------
> Web Archive:  http://www.mail-archive.com/cgiapp@lists.vm.com/
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.vm.com/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to