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

I have gotten what looks like some kind of mod_perl error. I'm not sure why mod_perl may have tacked on all of those X's to the end of the package name. My wild guess is that it has something to do with avoiding namespace collision.

#this sort of what the error looks like

Identifier too long at (eval 425) line 1. eval 'package Apache::ROOTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +XXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX::error_2em;use Apache qw(exit);sub handler ;' called at /usr/local/lib/perl5/site_perl/5.8.3/i386-freebsd/Apache/ +Registry.pm line 183 Apache::Registry::compile('package Apache::ROOTXXXXXXXXXXXXXXX +XXXXXXXXXXXXXXXXXXXXXXXXXX...') called at /usr/local/lib/perl5/site_p +erl/5.8.3/i386-freebsd/Apache/Registry.pm line 134 Apache::Registry::handler('Apache=SCALAR(0xa75a3cc)') called a +t (eval 425) line 1
I would like to know what Caused the X's to get added. and a possible good solution? thanks

Replies are listed 'Best First'.
Re: Stacking X's to the end of the package name
by ig (Vicar) on Oct 28, 2008 at 17:54 UTC

    If you increase your debug level to at least 4 Apache::Registry will log the filename passed by the Apache web server and various other information along the way. This may help you identify where the problem is. I don't have mod_perl 1.x available, but it appears you can set debugging level by including the following in your CGI script:

    use Apache::Debug level => 4

    Is the problem only with one script or are all your scripts failing?

    Have you tried a simple script like the following:

    #!/usr/bin/perl print "Content-type: text/plain\n\n"; print "mod_perl rules!\n";

    Or, for a little more information about your request, you might try the following:

    use Apache::Debug ( ); my $r = shift; Apache::Debug::dump($r, "some comment", "another comment", ...);

    It might also help if you showed a copy of the relevant sections of your web server configuration.

Re: Stacking X's to the end of the package name
by Corion (Patriarch) on Oct 28, 2008 at 17:26 UTC

    It's not Perl but some module. But as you don't show anything of your code, it's kinda hard to diagnose. Possibly it has something to do with Apache::Registry, at least in its source code, there is mention of ::ROOT. If you crank up the debugging output for Apache::Registry to at least 4, you will see the steps it does. I see an mtime check there, so maybe your mod_perl scripts are accessed via NFS and the server times are off, so the scripts get recompiled all the time?

    I don't see any code that appends X to the package name, so maybe your problem lies elsewhere. Reduce your code until you have a minimal, self-contained example that you can show us.

Re: Stacking X's to the end of the package name
by brian_d_foy (Abbot) on Oct 28, 2008 at 17:57 UTC

    I had that happen once. It turned out that my cat had laid her head on my keyboard while I was away. I had left my editor as the frontmost application.

    She also tends to turn on caps lock and num lock.

    --
    brian d foy <brian@stonehenge.com>
    Subscribe to The Perl Review
      She also tends to turn on caps lock and num lock.

      Around here, that key is called "cats lock". ;-)

      HTH,

      planetscape

      If only we could embed images . . .

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

Re: Stacking X's to the end of the package name
by perrin (Chancellor) on Oct 28, 2008 at 17:39 UTC
    Apache::Registry does generate package names. They don't normally look like a bunch of Xes though. Make sure you have the latest release of mod_perl 1.x there.
Re: Stacking X's to the end of the package name
by mr_mischief (Monsignor) on Oct 28, 2008 at 16:31 UTC
    Please use <code> and </code> tags or <c> and </c> tags around code, data, and long output quotes. Your node pushes out the browser display of the site so that folks have to side-scroll around it.
Re: Stacking X's to the end of the package name
by Anonymous Monk on Oct 29, 2008 at 14:48 UTC
    This error only happened once and I am trying to recreate the conditions that caused it. And No it's not a cat or a dog. ;-)