You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Nath <na...@hotmail.com> on 2004/03/11 07:08:56 UTC

perl to modperl transition problems

I loaded up modperl and everything looks like it's working, but there's a
few transition problems moving over from perl to modperl. For starters, the
"do" command isn't working. I use this to load external scripts since I keep
things separated into their own files. For some reason modperl just reads
right over them and I don't know why. Secondly, I read XML files that were
located right in the actual cgi-bin folder. Ex: open "XML/file.xml". Except
now modperl expects me to put in the entire location
C:\webserver\perl\xml\file.xml. It's a bit of a convenience thing, but is
there anyway to maintain the original perl's functionality for local file &
folder lookups?

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: perl to modperl transition problems

Posted by Nath <na...@hotmail.com>.
Nice! It all worked now. It's odd how the page said this problem would be
fixed in version 2.0 =)

Thanks for your help,
Nath

----- Original Message ----- 
From: "Perrin Harkins" <pe...@elem.com>
To: "Nath" <na...@hotmail.com>
Cc: <mo...@perl.apache.org>
Sent: Thursday, March 11, 2004 1:17 AM
Subject: Re: perl to modperl transition problems


> Nath wrote:
> > I loaded up modperl and everything looks like it's working, but there's
a
> > few transition problems moving over from perl to modperl. For starters,
the
> > "do" command isn't working. I use this to load external scripts since I
keep
> > things separated into their own files. For some reason modperl just
reads
> > right over them and I don't know why. Secondly, I read XML files that
were
> > located right in the actual cgi-bin folder. Ex: open "XML/file.xml".
Except
> > now modperl expects me to put in the entire location
> > C:\webserver\perl\xml\file.xml.
>
> These sound like they are both the same thing, i.e. the server is not
> doing a chdir into the directory of the script like CGI does.  Are you
> using mod_perl 2 and ModPerl::Registry?  If so, look at this:
>
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Registry___C_Apache__PerlRun__and_Friends
>
> - Perrin
>
>
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>
>

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: perl to modperl transition problems

Posted by Perrin Harkins <pe...@elem.com>.
Nath wrote:
> I loaded up modperl and everything looks like it's working, but there's a
> few transition problems moving over from perl to modperl. For starters, the
> "do" command isn't working. I use this to load external scripts since I keep
> things separated into their own files. For some reason modperl just reads
> right over them and I don't know why. Secondly, I read XML files that were
> located right in the actual cgi-bin folder. Ex: open "XML/file.xml". Except
> now modperl expects me to put in the entire location
> C:\webserver\perl\xml\file.xml.

These sound like they are both the same thing, i.e. the server is not 
doing a chdir into the directory of the script like CGI does.  Are you 
using mod_perl 2 and ModPerl::Registry?  If so, look at this:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Registry___C_Apache__PerlRun__and_Friends

- Perrin


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html