[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason-devel
Subject:    Re: [Mason-devel] HTML::Mason::Resolver::File::ApacheHandler inconvenient
From:       "Jonathan Swartz" <swartz () pobox ! com>
Date:       2003-07-15 18:00:33
[Download RAW message or body]

While we're at it, we should (after the branch) try to fix the heinous
difficulty in subclassing Component/Subcomponent/Component::FileBased.

----- Original Message -----
From: "John Williams" <williams@tni.com>
To: <mason-devel@lists.sourceforge.net>
Sent: Tuesday, July 15, 2003 10:34 AM
Subject: [Mason-devel] HTML::Mason::Resolver::File::ApacheHandler
inconvenient


> I'm playing with a Resolver subclass, and I am finding the split
> between HTML::Mason::Resolver::File and
> HTML::Mason::Resolver::File::ApacheHandler to be inconvenient.
>
> Since my Resolver is also file-based, I am inheriting from
> HTML::Mason::Resolver::File, but I cannot use that class in Apache
> because it is missing the apache_request_to_comp_path method.
> I also cannot inherit from HTML::Mason::Resolver::File::ApacheHandler
> for use outside of Apache (e.g. testing!) because
> "use HTML::Mason::ApacheHandler" gets the error "Undefined subroutine
> &Apache::perl_hook called at /.../HTML/Mason/ApacheHandler.pm line 334."
>
> I could have created another (empty) class which inherited from both my
> resolver class and HTML::Mason::Resolver::File::ApacheHandler, but that
> seems like too much of an administrative headache, so I just copied
> the apache_request_to_comp_path method verbatim to my resolver class.
>
> A quick survey of the two Resolvers on CPAN (MasonX::Resolver::PAR and
> MasonX::Resolver::CVS) shows that both authors rejected the
> Apache/non-Apache split, and just defined apache_request_to_comp_path in
> their Resolver classes.
>
> I propose we do the same, and merge
> HTML::Mason::Resolver::File::ApacheHandler into the
> HTML::Mason::Resolver::File class.  All it involves is adding the
> apache_request_to_comp_path method, and adjusting
> HTML::Mason::ApacheHandler to use the right class.  (The only other change
> is that HTML::Mason::Resolver::File::ApacheHandler is requiring a
> comp_root parameter, but HTML::Mason::ApacheHandler is providing a default
> value for it.)
>
> Are there any objections?  (Aside from the obvious "wait until after we
> fork off a new development version".)
>
> ~ John Williams
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps1
> _______________________________________________
> Mason-devel mailing list
> Mason-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-devel
>



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Mason-devel mailing list
Mason-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic