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

Hi, I'm trying to maintain an update a crufty Perl CGI I've inherited, and it has one behaviour which is really baffling me.

When I run the CGI I'm getting what looks like Perl internals printed to Apache's error_log.

e.g.

SV = RV(0x87a4af0) at 0xbffff530
  REFCNT = 1
  FLAGS = (ROK,READONLY)
  RV = 0x87f86a0
SV = RV(0x87a4b3c) at 0x87f876c
  REFCNT = 1
  FLAGS = (ROK)
  RV = 0x87f8778
SV = RV(0x88001c0) at 0xbffff2b0
  REFCNT = 1
  FLAGS = (ROK,READONLY)
  RV = 0x87f8778
I have no idea why it is doing this. It doesn't seem to be effecting the application, but it is bugging me not to understand it.

Apache is a simple httpd, no mod_perl. The CGI uses DBI, and a few other modules, but nothing all that interesting. I'm not using Devel::Peak or something else that would make me expect to see Perl guts.

Any ideas?

  • Comment on CGI spilling Perl internals into error log

Replies are listed 'Best First'.
Re: CGI spilling Perl internals into error log
by gellyfish (Monsignor) on Feb 17, 2002 at 22:00 UTC

    Are you serializing some database handle or something else in your code ?

    /J\

      Yes, exactly! Way down deep some data structure had a reference to a $dbh, and was getting passed to Storable's clone method.

      Thank you so much. How did you know?

        How did you know?

        Been there, done that, filled up /var :)

        /J\

Re: CGI spilling Perl internals into error log
by traveler (Parson) on Feb 17, 2002 at 23:59 UTC
    That looks like output from Devel::Peek. I would do a grep for it just in case it is required deep inside the module somewhere.

    HTH, --traveler