Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

The Case of the Missing .pm which isn't supposed to be there...

by suaveant (Parson)
on Jan 25, 2002 at 02:07 UTC ( #141343=perlquestion: print w/replies, xml ) Need Help??

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

I am in the midst of a quandary...

We use FastCGI... and we are have inconsistent issues with an included package... the package fcgi_call is a wrapper to call our data fcgis and handle headers and error cases and parse data usefully. It has subclasses withing the file to which it passes of different types of data to parse them...

The problem is that one of these subtypes is being looked for as a file, which I can't understand, since there is no use or require statement for it anywhere in the code... I just have the multiple packages in one file...

Does anyone have any idea what may lead to this problem... or at least how I can track down line 3 of eval 10?

Can't locate fcgi_call/ in @INC (@INC contains: perl/ perl /g +ums/rel/lib /prod/gnumod/ext /home/webdev/fc /prod/perl/5.6.1/lib/5.6.1/sun4-solaris /prod/perl/5.6.1/lib/5.6.1 /prod/perl/5.6.1/lib/site_perl/5.6.1/sun4-solaris /prod/perl/5.6.1/lib/site_perl/5.6.1 /prod/perl/5.6.1/lib/site_perl .) at (eval 10) line 3.

                - Ant
                - Some of my best work - (1 2 3)

Replies are listed 'Best First'.
Re: The Case of the Missing .pm which isn't supposed to be there...
by chipmunk (Parson) on Jan 25, 2002 at 07:21 UTC
    You can track down the location of the eval by setting up a die handler that prints a stack trace. For example:
    $SIG{__DIE__} = sub { my @stack; my $i = 0; while(my($package, $file, $line) = caller($i++)) { push @stack, " package $package, file $file, line $line\n"; } die @_, @stack; };
    Note that I have not tested this with FastCGI.

    First, though, you should do a quick grep of the source for the word 'simple'. That's easier and should work fine in this case.

Re: The Case of the Missing .pm which isn't supposed to be there...
by Flame (Deacon) on Jan 25, 2002 at 02:16 UTC
    Well, Eval 10 is the tenth eval to be executed, if you have an eval in a loop, it will probably be the tenth time that eval is executed (even though it may be the same as eval 1). You could step through it in the debugger and see where it tries to read in

    "Weird things happen, get used to it."

    Flame ~ Lead Programmer: GMS

      I have used the debugger very little... and the problem is partially that I am not running the script myself when it is having this problem... fcgi is starting it...

      is there a way to track which eval I am in in the debugger? (or is just counting the eval statements as they go by good enough?)

                      - Ant
                      - Some of my best work - (1 2 3)

        As to tracking the eval, I'm not sure, but it might be helpful if you used Devel::ptkdb (Install Tk too). It provides a nice gui interface so you can see the code and track variables all at once. I find it much nicer and definately easier to use than the normal debugger.

        If worst comes to worst, could you post some of the relevant code so we can search ourselves?

        "Weird things happen, get used to it."

        Flame ~ Lead Programmer: GMS

        If you can use the Tk Debugger you can debug cgi scripts as well.

        toma has written a node on how to do this here.

        Note that you don't need Tk nor X to debug: Debugging a CGI.

                - tye (but my friends call me "Tye")

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://141343]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2022-08-10 16:34 GMT
Find Nodes?
    Voting Booth?

    No recent polls found