soldierdog has asked for the wisdom of the Perl Monks concerning the following question:

Quick Question. I'm trying to get my first CGI::Application perl prog working but I keep getting an error "WidgetView.pm did not return a true value at widgetview.cgi line 4. BEGIN failed--compilation aborted at widgetview.cgi line 4" or swap with another script name. Line 4 is "use WidgetView;" . I have set the perl path through "lib data;" in widgetview.cgi where "data" is a subdir in my web root directory. Any help getting past this baby step would be fantastic. Where exactly or how exactly to I properly define the perl lib search path and is that the problem?
  • Comment on CGI::Application Getting Started Error Perl lib

Replies are listed 'Best First'.
Re: CGI::Application Getting Started Error Perl lib
by VSarkiss (Monsignor) on May 16, 2005 at 14:33 UTC
      Have I told you all you folks just how much I appreciate everyone here. Thanks again for 1: Helping for for 2: Straightening out my thinking process through pointing out what perl is reporting and not my own extrapolations. It works fine now.
Re: CGI::Application Getting Started Error Perl lib
by perrin (Chancellor) on May 16, 2005 at 14:34 UTC
    It isn't saying it can't find it -- it's saying it didn't return a true value. Do you have the usual "1;" at the end of it?
      Another quick silly question for you people. Now it is instantiating and working correctly except I am getting this at the end of the html page in the browswer. Content-Type: text/html; charset=ISO-8859-1 1 Which displays the content type and the return value.
        Have you got an example of your code? I suspect that you're printing the header as with traditional CGI scripts. CGI::Application outputs the header for you.