About RFC 271: pre/post handlers

2001-01-24 Thread Branden
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

Re: About RFC 271: pre/post handlers

2001-01-24 Thread John Porter
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); >

RE: About RFC 271: pre/post handlers

2001-01-24 Thread Garrett Goebel
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

Re: About RFC 271: pre/post handlers

2001-01-24 Thread Damian Conway
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