[Catalyst] create controller helper

Kiffin Gish kiffin.gish at planet.nl
Sat Jan 9 11:35:55 GMT 2010


Yes you're right, I overlooked the presence namespace::autoclean at the
top.

Checked out the documentation but don't quite understand the difference
with namespace::clean. Is the latter the same as auto except then more
explicit in that only named -except methods aren't cleaned out?

Also, when use Moose is used, is it no longer necessary to end the pm
module with a "1;"?

On Fri, 2010-01-08 at 22:47 +0000, Tomas Doran wrote:
> 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
> 
> 
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/


-- 
Kiffin Gish <Kiffin.Gish at planet.nl>
Gouda, The Netherlands





More information about the Catalyst mailing list