pod files

2003-08-14 Thread ColinB
A relatively trivial point, but I notice that the pod files cgi_to_mod_perl.pod mod_perl.pod mod_perl_tuning.pod which were supplied with mod_perl 1 are missing from mod_perl 2 (perhaps because they need re-writing?) Is it indended to include these in the final mod_perl 2 release? Thanks

Re: Working directory of script is / !

2003-07-30 Thread ColinB
Don't mess with the cooker, try using a subclass, e.g.: # ModPerl/RegistryPrefork.pm 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

Re: Working directory of script is / !

2003-07-30 Thread ColinB
--- Stas Bekman [EMAIL PROTECTED] wrote: This seems to work OK. Hopefully I should now be able to remove the mod_perl 1's Registry.pm file. Thanks everyone. Perfect. I've replaced the suggestion to use mp1's Apache::Registry with this better solution, which doesn't require mp1:

Working directory of script is / !

2003-07-29 Thread ColinB
I'm steadily making progress with getting a collection of mod_perl 1 compatibale scripts working with mod_perl 2 using the backward compatibility mode. However, I find that the working directory of all scripts is /. This occurs for both ModPerl::Registry and Apache::Registry. This causes many

Re: Working directory of script is / !

2003-07-29 Thread ColinB
--- Stas Bekman [EMAIL PROTECTED] wrote: ... I won't commit it yet, but you can override it in your startup.pl, until the dust settles down: require Apache::compat; sub Apache::RequestRec::chdir_file { my $dir = @_ == 2 ? $_[1] : $_[0]-filename; chdir $dir; } Thanks Stas.

Re: Working directory of script is / !

2003-07-29 Thread ColinB
... and even stranger, when I invoke the printenv cgi script for the FIRST time it STILL displays / for the working directory, but if I then click the IE browser's refresh (or CTRL-Refresh) button it changes to the server root /dir1/dir2/httpd. Subsequent clicks of the refresh button continue to

Re: Working directory of script is / !

2003-07-29 Thread ColinB
Thanks Stas that worked a treat, except that your call to File::Basename::basename should be File::Basename::dirname The strange reversion to / seems to have been cured too. Colin __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design

Re: Working directory of script is / !

2003-07-29 Thread ColinB
Can you please post a working solution, so I'll add it to docs. I added this to my startup.pl just after the use Apache::compat(); sub Apache::RequestRec::chdir_file { use File::Basename(); my $file = @_ == 2 ? $_[1] : $_[0]-filename; my $dir = File::Basename::dirname($file);

Can't locate object method cgi_env

2003-07-28 Thread ColinB
I'm trying to get some perl scripts that work OK under mod_perl 1 working in mod_perl 2. I'm therefore using the mod_perl 1 backward compatiblity, and also the Apache::Registry from mod_perl 1 (as described in the mod_perl 2 documentation to get around the chdir() problem). One of the scripts

Re: Can't locate object method cgi_env

2003-07-28 Thread ColinB
--- Stas Bekman [EMAIL PROTECTED] wrote: Stas Bekman wrote: ColinB wrote: One of the scripts sets up a request handler, but when it tries to execute: $r-cgi_env(AB_AUTHHOST=$host); I have never used that API, but I believe you misuse it. I think it should be: $r

Re: Apache::Registry in mod_perl 2

2003-07-17 Thread ColinB
--- Stas Bekman [EMAIL PROTECTED] wrote: ColinB wrote: So how can I go about installing just Apache::Registry from the mod_perl 1 tar file without having to install ALL of mod_perl 1 ? simply copy it into one of the dirs in your @INC. You will also need to load Apache::compat

Apache::Registry in mod_perl 2

2003-07-15 Thread ColinB
This page: http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Registry___C_Apache__PerlRun__and_Friends says that mod_perl 2's ModPerl::Registry does not chdir() into the script's directory, wheras mod_perl 1's Apache::Registry DOES chdir(). It also says that this will eventually

Is statically-compiled mod_perl better?

2003-07-03 Thread ColinB
What is the preferred method of compiling mod_perl - static or dynamic? I have read that *static* linking is likely to load and execute faster, but may be wasteful of resources if there are multiple proceses each with its own copy of the common code. It therefore seems likely that a statically

Re: Is statically-compiled mod_perl better?

2003-07-03 Thread ColinB
Thanks for the comments. I guess I'll just have to stick with the dynamically-linked mod_perl 2.0 for the time being. I'll keep checking the mod_perl 2.0 site pages and pick up a static-capable version when it becomes available. Colin __ Do you