Stas,

Thank you for your quick reply, I appreciate it.

I put your test script, require.pl, in /var/www/cgi-bin and DID get the
error message:

[Wed Aug 13 10:19:13 2003] [error] [client 10.0.3.131] Pseudo-hashes are
deprecated at
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/ModPerl/RegistryPre
fork.pm line 23.!

I added the first line to the script you sent me so that I could be
absolutely sure it worked when run as a normal CGI script:
#! /usr/bin/perl
# require.pl
#-----------
my $r = shift;

print "Content-type: text/html\n\n";

my $file = "./require.pl";

print "can't find $file\n" unless -e $file;

print "$file is found\n";
---------------- END FILE ----------------

Here are the contents of
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/ModPerl/RegistryPre
fork.pm:
#file:ModPerl/RegistryPrefork.pm
# From http://perl.apache.org/docs/2.0/user/porting/compat.html
#-------------------------------
package ModPerl::RegistryPrefork;

use strict;
use warnings FATAL => 'all';

our $VERSION = '0.01';

use base qw(ModPerl::Registry);

use File::Basename ();

sub handler : method {
    my $class = (@_ >= 2) ? shift : __PACKAGE__;
    my $r = shift;
    return $class->new($r)->default_handler();
}

sub chdir_file {
    use File::Basename();
    my $file = @_ == 2 ? $_[1] : $_[0]->{FILENAME};
    my $dir = File::Basename::dirname($file);
    chdir $dir or die "Can't chdir to $dir: $!";
}

1;
--------------------END FILE--------------------------

And here are the contents of /etc/httpd/conf.d/perl.conf:
#
# Mod_perl incorporates a Perl interpreter into the Apache web server,
# so that the Apache web server can directly execute Perl code.
# Mod_perl links the Perl runtime library into the Apache web server
# and provides an object-oriented Perl interface for Apache's C
# language API.  The end result is a quicker CGI script turnaround
# process, since no external Perl interpreter has to be started.
#

LoadModule perl_module modules/mod_perl.so

# This will allow execution of mod_perl to compile your scripts to
# subroutines which it will execute directly, avoiding the costly
# compile process for most requests.
#
#Alias /perl /var/www/perl
Alias /exe /var/www/cgi-bin
#<Directory /var/www/perl>
#<Directory /var/www/cgi-bin>
<Location /exe>
    SetHandler perl-script
    PerlHandler ModPerl::RegistryPrefork
    PerlOptions +ParseHeaders
    Options +ExecCGI
</Location>
#</Directory>
---------------------------------END FILE---------------------------------

Please let me know if there is any other information I can provide that
would
help.

Thanks again,

Ed Ruben
Keyhole Corp.

-----Original Message-----
From: Stas Bekman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 10:10 PM
To: Ed Ruben
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [mp2] RegistryPrefork has deprecated Pseudo-hash


Ed Ruben wrote:
>
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
>
> Here is the error message I see in the error log file:
> [Tue Aug 12 14:53:30 2003] [error] [client 10.0.3.131] Pseudo-hashes are
> deprecated at
>
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/ModPerl/RegistryPre
fork.pm
> line 23.!
>
> I am using the RegistryPrefork module described on
>
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Registry_
__C_Apache__PerlRun__and_Friends
>
>
> The line it seems to be complaining about is:
>
>     my $file = @_ == 2 ? $_[1] : $_[0]->{FILENAME};
>
> All code that isn't mine is that shipped with RedHat 9.0.
>
> As you would assume, I am trying to use mod_perl with Apache 2.0.  My
> code does
> use relative addresses and I was hoping to avoid having to go into the
> code to change all the relative addresses to absolutes.  It has be
> working successfully with mod_perl 1.0 on Apache 1.3.  I tried looking
> on the web for someone running into a similar problem, but was unable to
> find any such issue.
>
> Here are the contents of my /etc/httpd/conf.d/perl.conf file:
> Alias /exe /var/www/cgi-bin
> #<Directory /var/www/perl>
> <Directory /var/www/cgi-bin>
>    SetHandler perl-script
>    PerlHandler ModPerl::RegistryPrefork
>    PerlOptions +ParseHeaders
>    Options +ExecCGI
> </Directory>
>
> Thank you for your assistance, I appreciate it.

Looks like it's a problem in your code. As you didn't supply a simple script
to reproduce the problem, I wrote one, but I couldn't reproduce it. Here is
what I was testing with:

# require.pl
#-----------
my $r = shift;

print "Content-type: text/html\n\n";

my $file = "./require.pl";

print "can't find $file\n" unless -e $file;

print "$file is found\n";

  > [Tue Aug 12 14:53:30 2003] [error] [client 10.0.3.131] Pseudo-hashes are
 > deprecated at
 >
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/ModPerl/RegistryPre
fork.pm

 > line 23.!

Could it be that something in your code triggers the problem? Can you
reproduce the problem with my test script?

In any case it's should be possible to rewrite the code to not make it think
that it's a pseudo-hash (which it is not), but without being able to
reproduce
the problem I'm not sure how.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to