You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Thomas Klausner <do...@zsi.at> on 2001/12/11 21:54:52 UTC

RFC: CGI vs. Apache Namespace Question

Hi!

I've got a small CPAN Namespace Question:

Some time ago I wrote CGI::URI2param (
http://search.cpan.org/search?mode=module&query=URI2param
).

Now, thanks to an idea by darren chamberlain, I wrote a small
PerlInitHandler that does nothing more than parse some PerlSetVars and then
call uri2param(). But still it is very convienient to use it like this.

So should I:
1* put the Apache Handler into CGI::URI2param, which maybe is some sort of
Namespace violation (you'd have to say 
  PerlInitHandler CGI::URI2param
in httpd.conf)
  
2* create a new module, Apache::URI2param, which only contains the config
parsing stuff and requires CGI::URI2param. This would result in two small
modules cluttering CPAN, where one of those (Apache::URI2param) is useless
without the other

3* dump CGI::URI2param in favour of Apache::URI2param, which wouldn't make
much sense either, because the code does not depend on mod_perl (and not
even on Apache)

4* let the users write there own handlers

I tend to use solution 1, but if you would like to comment on this, I would 
really appreciate some feedback!


-- 
 D_OMM      +---->  http://domm.zsi.at <-----+
 O_xyderkes |       neu:  Arbeitsplatz       |   
 M_echanen  | http://domm.zsi.at/d/d162.html |
 M_asteuei  +--------------------------------+



Re: RFC: CGI vs. Apache Namespace Question

Posted by Thomas Klausner <do...@zsi.at>.
Hi!

On Wed, Dec 12, 2001 at 01:44:52PM -0500, darren chamberlain wrote:
> I didn't even think of that; if Apache is not installed, having
> URI2Param.pm in site_perl/Apache doesn't matter.  Therefore, I
> would like to resubmit option 5:
> 
>   5)  Include Apache::URI2Param with the CGI::URI2Param module
>       that gets installed along with CGI::URI2Param, where
>       Apache::URI2Param calls CGI::URI2Param::uri2param.

A great idea, I'll make it so!

Thanks 

BTW, sorry for the long delay, but the combination of arctic temperatures
(-15 deg. Celsius) in Vienna and me still riding my bike resulted in some
sort of flu. But now I am well again ...

-- 
 D_OMM      +---->  http://domm.zsi.at <-----+
 O_xyderkes |       neu:  Arbeitsplatz       |   
 M_echanen  | http://domm.zsi.at/d/d162.html |
 M_asteuei  +--------------------------------+



Re: RFC: CGI vs. Apache Namespace Question

Posted by darren chamberlain <dl...@users.sourceforge.net>.
James G Smith <JG...@TAMU.Edu> said something to this effect on 12/12/2001:
> darren chamberlain <dl...@users.sourceforge.net> wrote:
> >  5)  Include Apache::URI2Param with the CGI::URI2Param module
> >      that gets installed along with CGI::URI2Param if Apache.pm is
> >      installed, where Apache::URI2Param calls
> >      CGI::URI2Param::uri2param.
> >
> >That'd be the way I would go, although I'm not sure what
> >Makefile.PL would look like.
> 
> I'd go ahead and install it regardless of whether or not Apache.pm is
> installed (if writing an Apache:: module) in case mod_perl gets installed
> after this one and the mod_perl installer doesn't realize they have to go
> back and re-install this module to get the Apache:: version.

I didn't even think of that; if Apache is not installed, having
URI2Param.pm in site_perl/Apache doesn't matter.  Therefore, I
would like to resubmit option 5:

  5)  Include Apache::URI2Param with the CGI::URI2Param module
      that gets installed along with CGI::URI2Param, where
      Apache::URI2Param calls CGI::URI2Param::uri2param.

(darren)

-- 
If we can't be free at least we can be cheap.

Re: RFC: CGI vs. Apache Namespace Question

Posted by darren chamberlain <dl...@users.sourceforge.net>.
Thomas Klausner <do...@zsi.at> said something to this effect on 12/11/2001:
> I've got a small CPAN Namespace Question:
> 
> Some time ago I wrote CGI::URI2param (
> http://search.cpan.org/search?mode=module&query=URI2param
> ).
> 
> Now, thanks to an idea by darren chamberlain, I wrote a small
> PerlInitHandler that does nothing more than parse some
> PerlSetVars and then call uri2param(). But still it is very
> convienient to use it like this.
> 
> So should I: 1* put the Apache Handler into CGI::URI2param,
> which maybe is some sort of Namespace violation (you'd have to
> say PerlInitHandler CGI::URI2param in httpd.conf)
>   
> 2* create a new module, Apache::URI2param, which only contains
> the config parsing stuff and requires CGI::URI2param. This
> would result in two small modules cluttering CPAN, where one of
> those (Apache::URI2param) is useless without the other
> 
> 3* dump CGI::URI2param in favour of Apache::URI2param, which
> wouldn't make much sense either, because the code does not
> depend on mod_perl (and not even on Apache)
> 
> 4* let the users write there own handlers
> 
> I tend to use solution 1, but if you would like to comment on
> this, I would really appreciate some feedback!

  5)  Include Apache::URI2Param with the CGI::URI2Param module
      that gets installed along with CGI::URI2Param if Apache.pm is
      installed, where Apache::URI2Param calls
      CGI::URI2Param::uri2param.

That'd be the way I would go, although I'm not sure what
Makefile.PL would look like.

(darren)

-- 
A computer lets you make more mistakes faster than any other
invention, with the possible exceptions of handguns and Tequila. 
    -- Mitch Ratcliffe