On Tue, 28 Dec 1999 [EMAIL PROTECTED] wrote:

> I'm using Apache/1.3.9, mod_perl/1.21, mod_ssl/2.4.9, OpenSSL/0.9.4
> with Content Negotiation enabled (mod_negotiation).
> 
> My idea was to use this feature for mod_perl-scripts,also.
> So I created to scripts for testing:
> - test.pl.en
> - test.pl.de
> 
> The first time I accessed /perl/test.pl I got the output of test.pl.de
> (because my favorite Language is "de" ...)
> I changed the Language to "en" in my Browser and reloaded the
> script. But the output was still from test.pl.de.
> 
> It's clear, because the scripts are cached by URI and it was "/perl/test.pl"
> for both tries.
> 
> I have changed following lines in site/5.00503/lib/ApacheRegistry.pm to 
> cache the scripts by absolute filename:
> 
> 62: # del by [EMAIL PROTECTED]
> 63: #my $script_name = $r->path_info ?
> 64: #    substr($uri, 0, length($uri)-length($r->path_info)) :
> 65: # $uri;
> 66: # ins by [EMAIL PROTECTED]
> 67: my $script_name = $filename;
> 
> And it seems to work.
> 
> And here are the questions:
> Is it *nice* what I have made ?
> Do You see any troubles (or impacts) with that change ?
> Why do You take the URI ?

Apache::RegistryNG uses the filename instead of uri.  uri was chosen
because there used to be a limit to the length of Perl package names.  and
regardless, shorter package name based on the uri uses less memory and
provides a faster lookup than the filename.

Reply via email to