brent.allsop has asked for the wisdom of the Perl Monks concerning the following question:

Monks,

I’m trying to get Apache::ASP up and running on a web server.

I had several problems getting all the modules installed so the httpd would start, without causing fatal errors in the startup.pl script. The errors would print out the @INC being used, and indicate it could not find a required pm file amongst those.

Each time it printed this, the following entry was at the top of the @INC path:

/usr/local/webtools

So I finally got all those problems worked out, and the httpd now starts just fine with no errors in startup.pl.

But now when I try to access an index.asp page, the compile fails, printing out a different set of @INC values, without the above webtools directory, saying it can’t find a required pm file. But the pm file is located in the above webtools directory.

So what is up with this different @INC array? I know how to add values to the startup.pl, but how do I add these to this other @INC that this compile process is using?

Brent

Replies are listed 'Best First'.
Re: multipe @INC arrays?
by RMGir (Prior) on Sep 02, 2007 at 02:37 UTC
    Check %INC, I guess. That should list everything that's been 'do'-ed, 'require'-ed, or 'use'-ed up to that point.

    One of those may be stomping your @INC, I don't know.


    Mike
      Mike,

      This doesn’t look right,

      when I do a

      use Carp qw(cluck); cluck "This is how we got here!";

      in an asp page that doesn’t need any pm files:

      It is clearly not being called from the startup.pl script that has the use lib '/usr/local/webtools'; statement in it that gets executed when apache starts up right?

      At the top of the stack there is just some:

      eval {...} called at -e line 0

      So how do you add a file to the @INC for those?

      Surely you don’t have to add something like this

      use lib '/usr/local/webtools';

      in every asp file?

      Brent Allsop

        Never mind!!

        Sorry, stupid mistake. It was in the @INC, just a few lines down. I must be blind. The pm file, in this case, was just missing.

        Thanks for all the help. And sorry!