> >
> > the below patches allow the following formats, in
> addition to what is
> > already currently supported
> >
> > $r->push_handlers(PerlFixupHandler => My::Class->can('foo'));
> > $r->set_handlers(PerlFixupHandler => [My::Class->can('foo')]);
>
> cool! i don't understand why universal.c needs a patch, the :method
> attribute should have already set that flag.
yeah, the folks at p5p were nice enought to point that out. I didn't have
any idea where that flag came from and was looking for a way to set it. use
attribues is pretty cool :)
at any rate, my works doesn't really work, though - the value pushed on the
stack is not a method but a coderef, so $self is CODE(XXXXX)
> could you make
> it so there's
> a new function that checks CvFLAGS and the $$ prototype, so both
> perl_handler_ismethod and your new function call that?
yeah, I think that's right. the thing is that we need to add another
function to call the method - none of the stock perlapi seem to do the
trick. something like
cv = sv_2cv(sv, &stash, &gv, FALSE);
if (cv && (CvFLAGS(cv) & CVf_METHOD)) {
PUSHMARK(SP);
XPUSHs(newSVpv(HvNAME(stash),0));
PUTBACK;
perl_call_sv(sv, G_METHOD);
}
and I'd have to learn about refcounting :)
I can definitely work this through, though, if there is an interest - I was
mainly playing with it to increase my knowledge :)
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]