Hi Monks,

Yet again I seek the wisdom of the sages. Per the subject line, have been successfully using:

CGI::Carp qw(script_1.cgi); CGI::Carp qw(script_2.cgi); CGI::Carp qw(script_3.cgi);

in script1, script2 and script3 to log information. All was working well until the introduction of home-brewed precompilation of the scripts, which seemed to work well until I noticed that all the logging referred to just one of the scripts (for example, "script_2.cgi").

In a nutshell, the precompilation is great, but accurate logging is even better. Anyone have an idea how to resolve this problem so I can have both? Would prefer to stick with the home brewed, or a fixed version of it.

The home brewed precompile (added to startup.pl) is:

{ use File::Find; use ModPerl::RegistryLoader (); my $rl = ModPerl::RegistryLoader->new ( package => 'ModPerl::Registry', debug => '8', NameWithVirtualHost => '0', ); my $directory = "/var/www/html/example.com/cgi-bin"; my $uri = "http://www.example.com/cgi-bin/"; opendir THISDIR, $directory or die $!; foreach ( @files = grep !/^\./, readdir THISDIR ) { $rl->handler( "/cgi-bin/$_" , "/var/www/html/example.com/cgi-bin/$_", "www.example.com" ); } }

As always, many thanks for your consideration.

In reply to CGI::Carp in Apache::Registry by bbfan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.