[Catalyst] create controller helper

Tomas Doran bobtfish at bobtfish.net
Fri Jan 8 22:47:18 GMT 2010


On 8 Jan 2010, at 19:48, Kiffin Gish wrote:

> When I call 'script/myapp_create.pl controller Base' it creates the
> module Base.pm with the following statement:
>
> BEGIN { extends 'Catalyst::Controller'; }
>
> What's the advantage of doing this? Are there any times one would NOT
> want to place it within BEGIN?

The code attributes (i.e. the sub foo : Thing {) syntax happens at  
compile time.

Ergo the BEGIN block.

>
> Also, I see that the following is not included by default:
>
> use namespace::clean -except => 'meta';
>

Don't we include namespace::autoclean instead?

Cheers
t0m




More information about the Catalyst mailing list