Hi.
I was reading RFC 271 and thinking about this pre/post handler thing. Why
instead of having 2 subs, one for pre and other for post condition, and
having to deal with things as strange as $_[-1], why don't we have only one
handler that calls the real sub?
Instead of:
: pre abc { do_pre_h
Branden wrote:
>
> Instead of:
>
> : pre abc { do_pre_handler(@_); }
> : post abc { do_post_handler($_[-1]); }
>
> why not make it:
>
> : pre_post_handler abc {
> : do_pre_handler(@_); # pre part
> : my $result = REAL_SUB::abc(@_);
> : do_post_handler($result);
>
From: Branden [mailto:[EMAIL PROTECTED]]
>
> I was reading RFC 271 and thinking about this pre/post
> handler thing. Why instead of having 2 subs, one for
> pre and other for post condition, and having to deal
> with things as strange as $_[-1], why don't we
> have only one handler that calls t
Branden wrote:
> I was reading RFC 271 and thinking about this pre/post handler
> thing. Why instead of having 2 subs, one for pre and other for post
> condition, and having to deal with things as strange as $_[-1], why
> don't we have only one handler that calls the real sub?
Becaus