in reply to Re: Authentication Script Path Problems
in thread Authentication Script Path Problems

I got it working!

The problem was the modules path.

Thank you for your concise instructions both in the tutorial and here regarding my installation problems.

I began anew. Since I had saved the scripts with the line numbers deleted I copied and pasted in the code into the appropriate files. When I checked I kept getting error messages. This was one of the last:

Simple.pm

Base class package "CGI::Application" is empty. (Perhaps you need to 'use' the module which defines that package first.) at /home/username/public_html/cgi-bin/WebApp/libs/MyLib/Login.pm line 4 BEGIN failed--compilation aborted at /home/username/public_html/cgi-bin/WebApp/libs/MyLib/Login.pm line 4. Compilation failed in require at (eval 1) line 3. ...propagated at /usr/lib/perl5/5.8.8/base.pm line 85. BEGIN failed--compilation aborted at Simple.pm line 5.

Login.pm

Base class package "CGI::Application" is empty. (Perhaps you need to 'use' the module which defines that package first.) at Login.pm line 4 BEGIN failed--compilation aborted at Login.pm line 4.

simple.pl

Base class package "CGI::Application" is empty. (Perhaps you need to 'use' the module which defines that package first.) at /home/username/public_html/cgi-bin/WebApp/libs/MyLib/Login.pm line 4 BEGIN failed--compilation aborted at /home/username/public_html/cgi-bin/WebApp/libs/MyLib/Login.pm line 4. Compilation failed in require at (eval 1) line 3. ...propagated at /usr/lib/perl5/5.8.8/base.pm line 85. BEGIN failed--compilation aborted at /home/username/public_html/cgi-bin/WebApp/libs/MyLib/Simple.pm line 5. Compilation failed in require at simple.pl line 5. BEGIN failed--compilation aborted at simple.pl line 5.

After uninstalling and reinstalling the "CGI::Application" several times and changing the order of the 'use lib' lines. Then I looked for

/usr/lib/perl5/5.8.8/base.pm line 85
(which didn't exist). While doing that I Googled for similar error messages and solutions.

I had begun my response to you when I thought that I would try to manually delete the CGI::Application file, using the file manager, before reinstalling. I couldn't find it and when I eventually did I discovered the CGI::Application in a different 'library'. So I tried the new library path and that's what worked.

It seems that my host, which auto-installs all modules from cpan, separates the requested modules and the pre-installed modules. Maybe that's standard.

Again, I appreciate your help.

  • Comment on Re^2: Authentication Script Path Problems

Replies are listed 'Best First'.
Re^3: Authentication Script Path Problems
by scorpio17 (Canon) on Sep 13, 2010 at 13:08 UTC

    Great! I'm glad you finally got it figured out.

    As a follow up, here's something you might consider as you continue to develop your site: most of the modules used in my tutorial are "pure perl" - the only exception (I think) is DBI, but that usually comes preinstalled on most systems. For pure-perl stuff, I much prefer to have my own library. It's really nothing more than just another directory with perl files inside. So, I have a local development machine with cpan setup to install modules to a local ~/libs directory. Then, when I'm ready to "go live", I copy all my web files to my production host, including my ~/libs directory of perl modules (just tar/zip it all up). That way I know I have the exact same version of each module on both the development machine and the production machine. You have no way of knowing when your host might decide to update stuff on you without warning, and this can cause problems. It also makes it easier on you if you need to move the site to a new host, or install the web app on multiple hosts, etc.

    Good luck!

      Hi,

      Okay. I certainly will be sure to keep a copy of the current versions of the modules.

      Thanks again!