[Catalyst] why use a local trick to replace the "$class->NEXT::setup"

luo.dongxiang luo.dongxiang at adways.net
Wed Apr 5 09:34:49 CEST 2006

When I was studying the source code of Catalyst, I found some programming  trick:

Catalyst.pm   line  692

    # Call plugins setup
        no warnings qw/redefine/;
        local *setup = sub { };

In the old version of Catalyst.pm, the code is :


(About more detail , please look at this http://dev.catalyst.perl.org/changeset/1030)

I want to know why not use the code "$class->NEXT::setup;" , and  how to use the trick in my code when the child-class  want to call the method of parent.

Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060405/5c82b77f/attachment.htm 

More information about the Catalyst mailing list