X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FHelper.pm;h=e3c289540c49fd94080739ef700b2c0627cc6236;hb=22f3a8dd32e5940d87a1d21642fa39c7813bc921;hp=2ae39968491bc4bb1acfa8f079ae96285fb83cf8;hpb=07f6e17275071dabc95d6a5bdc7b4c208f35e63d;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index 2ae3996..e3c2895 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -9,6 +9,7 @@ use IO::File; use FindBin; use Template; use Catalyst; +use Catalyst::Utils; use Catalyst::Exception; my %cache; @@ -61,8 +62,7 @@ sub mk_app { $self->{name} = $name; $self->{dir} = $name; $self->{dir} =~ s/\:\:/-/g; - $self->{appprefix} = lc $self->{dir}; - $self->{appprefix} =~ s/-/_/g; + $self->{appprefix} = Catalyst::Utils::appprefix($name); $self->{startperl} = $Config{startperl}; $self->{scriptgen} = $Catalyst::CATALYST_SCRIPT_GEN || 4; $self->{author} = $self->{author} = $ENV{'AUTHOR'} @@ -449,8 +449,8 @@ Sebastian Riedel, C =head1 LICENSE -This library is free software . You can redistribute it and/or modify -it under the same terms as perl itself. +This library is free software, you can redistribute it and/or modify +it under the same terms as Perl itself. =cut @@ -461,6 +461,7 @@ __appclass__ package [% name %]; use strict; +use warnings; # -Debug activates the debug mode for very useful log messages # Static::Simple will serve static files from the root directory @@ -469,10 +470,10 @@ use Catalyst qw/-Debug Static::Simple/; our $VERSION = '0.01'; # Configure the application -[% name %]->config( name => '[% name %]' ); +__PACKAGE__->config( name => '[% name %]' ); # Start the application -[% name %]->setup; +__PACKAGE__->setup; =head1 NAME @@ -522,8 +523,8 @@ sub default : Private { =head1 LICENSE -This library is free software . You can redistribute it and/or modify -it under the same terms as perl itself. +This library is free software, you can redistribute it and/or modify +it under the same terms as Perl itself. =cut @@ -633,8 +634,8 @@ Sebastian Riedel, C Copyright 2004 Sebastian Riedel. All rights reserved. -This library is free software. You can redistribute it and/or modify -it under the same terms as perl itself. +This library is free software, you can redistribute it and/or modify +it under the same terms as Perl itself. =cut __fastcgi__ @@ -671,8 +672,8 @@ Sebastian Riedel, C Copyright 2004 Sebastian Riedel. All rights reserved. -This library is free software. You can redistribute it and/or modify -it under the same terms as perl itself. +This library is free software, you can redistribute it and/or modify +it under the same terms as Perl itself. =cut __server__ @@ -759,8 +760,8 @@ Sebastian Riedel, C Copyright 2004 Sebastian Riedel. All rights reserved. -This library is free software. You can redistribute it and/or modify -it under the same terms as perl itself. +This library is free software, you can redistribute it and/or modify +it under the same terms as Perl itself. =cut __test__ @@ -816,8 +817,8 @@ Sebastian Riedel, C Copyright 2004 Sebastian Riedel. All rights reserved. -This library is free software. You can redistribute it and/or modify -it under the same terms as perl itself. +This library is free software, you can redistribute it and/or modify +it under the same terms as Perl itself. =cut __create__ @@ -882,14 +883,15 @@ Sebastian Riedel, C Copyright 2004 Sebastian Riedel. All rights reserved. -This library is free software. You can redistribute it and/or modify -it under the same terms as perl itself. +This library is free software, you can redistribute it and/or modify +it under the same terms as Perl itself. =cut __compclass__ package [% class %]; use strict; +use warnings; use base 'Catalyst::Base'; =head1 NAME @@ -929,8 +931,8 @@ Catalyst component. =head1 LICENSE -This library is free software . You can redistribute it and/or modify -it under the same terms as perl itself. +This library is free software, you can redistribute it and/or modify +it under the same terms as Perl itself. =cut