Hi Michael --
> The main reason I didn't do this was because the CAP::Apache wasn't a
> wrapper around Apache::Request, but a plugin for C::A.
That's correct -- it's not a wrapper. But you're trying to cram an
Apache::Request peg into a CGI.pm-shaped hole. As the IBM commercial
goes, "You're going to need an adapter." And since you're the one doing
the cramming, seems to me that you ought to write the adapter/wrapper.
> I was just trying to help people to be able to use as many
> plugins as possible with CAP::Apache. This may not be possible though.
A laudable task! You've done half of the job by creating CAP::Apache.
Now you have to do the other half and create a compatibility layer
between Apache::Request and CGI.pm. They are pretty similar, but not
the same.
> I think it would also be breaking encapsulation if my plugin added
> methods (such as 'cookie' or 'dump') to the Apache::Request
> namespace.
> I'm also not convinced that a wrapper is the best solution
> either since
> you would then have two interfaces for the same thing to keep in mind
> while programming. Ideally I wanted to allow users to be able to
> directly use Apache::Request, not something else.
I think you have two different desires in conflict here:
1. To use Apache::Request
2. To have it work just like CGI.pm
Apache::Request isn't CGI.pm. It can't do all CGI.pm functions without
your help.
Personally, I think a subclass would do the trick nicely. I can see it
now... "Apache::Request::CGIpm"
> Maybe I just need to petition the libapreq people to add a
> cookie method
> to Apache::Request.
If you're going to petition them for anything, you should ask them for
full CGI.pm compatibility. That seems to be their desire, at any rate.
TTYL,
-Jesse-
--
Jesse Erlbaum
The Erlbaum Group
suppressed
Phone: 212-684-6161
Fax: 212-684-6226
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.