Am Montag, 19. Januar 2004 15:03 schrieb Geoffrey Young:
> > If the example function is_initial_req() does not use a record of
> > request_rec and you think it makes no sense to define it in
> > Apache::RequestRec then my conclusion is it makes also no sense to do a
> > $r->is_initial_req() for the same reason and I'm happy to use
> > Apache::RequestUtil::is_initial_req($r);
>
> I don't understand this: is_initial_req() _does_ require a request_rec in
> C, thus is _does_require $r in Perl.

I know that. I dont mean a function or method without $r as parameter it is 
where is_initial_req and friends are defined.

Geoffrey wrote: 
> now, take a method like is_initial_req(), which represents access to
> ap_is_initial_req.  the call only makes sense at request-time, and the
> Apache API requires a request_rec structure. 
>but it doesn't make sense to 
> define it in Apache::RequestRec, since it does not access a property of the
> request_rec structure.

In this context it makes sens or not?  Quoting myself:
>> If the example function is_initial_req() does not use a record of
> > request_rec and you think it makes no sense to define it in
> > Apache::RequestRec then my conclusion is it makes also no sense to do a
> > $r->is_initial_req() for the same reason and I'm happy to use
> > Apache::RequestUtil::is_initial_req($r);

>
> > If it turns out that it is worth to have a $r->is_initial_req() it must
> > be defined in Apache::RequestRec. This way it is also possible to change
> > this method in subclasses of Apache::RequestRec.
>
> subclassing already works.  that is, currently if you subclass
> Apache::RequestRec you can define your own is_initial_req().  you just need
> to subclass Apache::RequestRec in the way the docs describe (which is the
> same way as mp1).
>

Yes I know, but it works only if you export the method in another namespace my 
main objection.

> in other words, everything is DWIM, save the need to load modules up front.
>
> > Maybe the Apache::RequestRec is the wrong name since a perl user dont
> > want a mirror of the C API or structs he want objects that do things easy
> > WITH whatever API.
>
> I strongly disagree with this.  mod_perl is access to the Apache C API in
> Perl - the more they look the same (and the more people that understand
> this) the better.

Ahh this is the source of the difference, I suppose the goal of mp2 is to 
build perlish interface to work with apache build around the C API. Your goal 
seems to mirror the C API to perl as close as possible.

>
> --Geoff

-- 
Boris

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to