Mark Stosberg <[EMAIL PROTECTED]> wrote:
> On 2005-05-25, Michael Graham <[EMAIL PROTECTED]> wrote:
> >
> > One thing I didn't take into account with my patch (and which has been
> > bugging me) is that duplicate hooks aren't filtered out.
>
> Thanks for mentiong this.
>
> I think it should.
I've made a new version which filters out duplicate callbacks:
http://occamstoothbrush.com/downloads/perl/CGI-Application-4.0_3-positionless-class-callbacks-patch2.tar.gz
Basically call_hook now keeps a hash of callbacks that it has already
executed for the current hook. If it encounters the same hook more than
once, it runs it the first time and skips it thereafter.
There's also a small change to the test script to test for this.
Michael
-----------------------------------------------------------------------
Michael Graham <[EMAIL PROTECTED]>
YAPC::NA 2005 Toronto - http://www.yapc.org/America/ - [EMAIL PROTECTED]
-----------------------------------------------------------------------
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]