Mark Stosberg <suppressed> wrote:
> On 2005-05-25, Michael Graham <suppressed> 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 <suppressed>
YAPC::NA 2005 Toronto - http://www.yapc.org/America/ - suppressed
-----------------------------------------------------------------------
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.