Re: [Rare Modules] Apache::RegistryNG
At 06:17 PM 2/4/00 +0200, Stas Bekman wrote: The next module is Apache::RegistryNG. CApache::RegistryNG is the same as CApache::Registry, aside from using filename instead of URI for the namespace. It also uses OO interface. snip There is no compelling reason to use CApache::RegistryNG over CApache::Registry, unless you want to do add or change the functionality of the existing IRegistry.pm. For example, CApache::RegistryBB (Bare-Bones) is another subclass that skips the stat() call performed by CApache::Registry on each request. One situation where Apache::RegistryNG may definitely be required is if you are rewriting URLS (using either mod_rewrite or your own handler) in certain ways. For instance if you have a rewrite rule of the form XYZ123456.html == /perl/foo.pl?p1=XYZp2=123456 Apache::Registry loses big, as it recompiles foo.pl for each unique URL. We ran into this and were totally baffled as to why we had no mod_perl performance boost until Doug pointed us to RegistryNG, which is definitely your friend in these circumstances. - Simon - Simon Rosenthal ([EMAIL PROTECTED]) Web Systems Architect Northern Light Technology 222 Third Street, Cambridge MA 02142 Phone: (617)577-2796 : URL: http://www.northernlight.com "Northern Light - Just what you've been searching for"
Re: [Rare Modules] Apache::RegistryNG
At 06:17 PM 2/4/00 +0200, Stas Bekman wrote: The next module is Apache::RegistryNG. CApache::RegistryNG is the same as CApache::Registry, aside from using filename instead of URI for the namespace. It also uses OO interface. snip There is no compelling reason to use CApache::RegistryNG over CApache::Registry, unless you want to do add or change the functionality of the existing IRegistry.pm. For example, CApache::RegistryBB (Bare-Bones) is another subclass that skips the stat() call performed by CApache::Registry on each request. One situation where Apache::RegistryNG may definitely be required is if you are rewriting URLS (using either mod_rewrite or your own handler) in certain ways. For instance if you have a rewrite rule of the form XYZ123456.html == /perl/foo.pl?p1=XYZp2=123456 Apache::Registry loses big, as it recompiles foo.pl for each unique URL. We ran into this and were totally baffled as to why we had no mod_perl performance boost until Doug pointed us to RegistryNG, which is definitely your friend in these circumstances. Huh? Why would Apache::Registry recompile /perl/foo.pl ? p1=XYZp2=123456 is a query string and it doesn't affect the created script's package name. Do I miss something? ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: [Rare Modules] Apache::RegistryNG
Hi there, On Fri, 4 Feb 2000, Stas Bekman wrote: CApache::RegistryNG inherits from CApache::PerlRun, but the handler() is overriden. Does this have any implications for users of `dirty' scripts? Obviously such scripts will be `legacy' code, of course... 73, Ged.
Re: [Rare Modules] Apache::RegistryNG
CApache::RegistryNG inherits from CApache::PerlRun, but the handler() is overriden. Does this have any implications for users of `dirty' scripts? Apache::PerlRun is for the `dirty' scripts, Apache::RegistryNG is not. Obviously such scripts will be `legacy' code, of course... 73, Ged. ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: [Rare Modules] Apache::RegistryNG
On Fri, 4 Feb 2000, Simon Rosenthal wrote: At 07:55 PM 2/4/00 +0200, Stas Bekman wrote: At 06:17 PM 2/4/00 +0200, Stas Bekman wrote: The next module is Apache::RegistryNG. CApache::RegistryNG is the same as CApache::Registry, aside from using filename instead of URI for the namespace. It also uses OO interface. snip There is no compelling reason to use CApache::RegistryNG over CApache::Registry, unless you want to do add or change the functionality of the existing IRegistry.pm. For example, CApache::RegistryBB (Bare-Bones) is another subclass that skips the stat() call performed by CApache::Registry on each request. One situation where Apache::RegistryNG may definitely be required is if you are rewriting URLS (using either mod_rewrite or your own handler) in certain ways. For instance if you have a rewrite rule of the form XYZ123456.html == /perl/foo.pl?p1=XYZp2=123456 Apache::Registry loses big, as it recompiles foo.pl for each unique URL. We ran into this and were totally baffled as to why we had no mod_perl performance boost until Doug pointed us to RegistryNG, which is definitely your friend in these circumstances. Huh? Why would Apache::Registry recompile /perl/foo.pl ? p1=XYZp2=123456 is a query string and it doesn't affect the created script's package name. Do I miss something? Yup, or I wasn't clear enough . The point was that we had a whole class of URLS that would yield different package names for Registry, even though they were all being processed by the same file. Add to my example above another rewrite: ABC99.html = /perl/foo.pl?p1=ABCp2=99... (and another, and another...) They all yield different package names based on the original URL (at least if you use mod_rewrite), so Registry has no way of knowing that they are all processed by the same script. RegistryNG doesn't have this problem, since the package name is based on $r-filename, which is the same for all of them. Ok, just so I could show a complete example for the guide, the rule: XYZ123456.html = /perl/foo.pl?p1=XYZp2=123456 generates the package Apache::root::...::XYZ123456_2ehtml ? This explains my confusion. ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
RE: [Rare Modules] Apache::RegistryNG
Simon - I'm not seeing the behavior you document after running a few tests... can you provide a specific RewriteRule and other relevant info? while mod_rewrite kinda has it own rules of play, the documentation says that the latest phase it touches is the Fixup phase, which, it explains, is before content manipulation therefore, as I understand it, before a PerlHandler has a chance to do anything... so, in theory, your problems sounds kinda weird (yet interesting) to me... hmmm --Geoff -Original Message- From: Stas Bekman [mailto:[EMAIL PROTECTED]] Sent: Friday, February 04, 2000 1:25 PM To: mod_perl list Subject: Re: [Rare Modules] Apache::RegistryNG On Fri, 4 Feb 2000, Simon Rosenthal wrote: At 07:55 PM 2/4/00 +0200, Stas Bekman wrote: At 06:17 PM 2/4/00 +0200, Stas Bekman wrote: The next module is Apache::RegistryNG. CApache::RegistryNG is the same as CApache::Registry, aside from using filename instead of URI for the namespace. It also uses OO interface. snip There is no compelling reason to use CApache::RegistryNG over CApache::Registry, unless you want to do add or change the functionality of the existing IRegistry.pm. For example, CApache::RegistryBB (Bare-Bones) is another subclass that skips the stat() call performed by CApache::Registry on each request. One situation where Apache::RegistryNG may definitely be required is if you are rewriting URLS (using either mod_rewrite or your own handler) in certain ways. For instance if you have a rewrite rule of the form XYZ123456.html == /perl/foo.pl?p1=XYZp2=123456 Apache::Registry loses big, as it recompiles foo.pl for each unique URL. We ran into this and were totally baffled as to why we had no mod_perl performance boost until Doug pointed us to RegistryNG, which is definitely your friend in these circumstances. Huh? Why would Apache::Registry recompile /perl/foo.pl ? p1=XYZp2=123456 is a query string and it doesn't affect the created script's package name. Do I miss something? Yup, or I wasn't clear enough . The point was that we had a whole class of URLS that would yield different package names for Registry, even though they were all being processed by the same file. Add to my example above another rewrite: ABC99.html = /perl/foo.pl?p1=ABCp2=99... (and another, and another...) They all yield different package names based on the original URL (at least if you use mod_rewrite), so Registry has no way of knowing that they are all processed by the same script. RegistryNG doesn't have this problem, since the package name is based on $r-filename, which is the same for all of them. Ok, just so I could show a complete example for the guide, the rule: XYZ123456.html = /perl/foo.pl?p1=XYZp2=123456 generates the package Apache::root::...::XYZ123456_2ehtml ? This explains my confusion. __ _ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com