use IO::File;
use FindBin;
use Template;
+our $CATALYST_SCRIPT_GEN = 2;
my %cache;
=head1 DESCRIPTION
-Bootstrap a Catalyst application.
+Bootstrap a Catalyst application. Autogenerates scripts
=head2 METHODS
=head3 mk_app
+Create the main application skeleton.
+
=cut
sub mk_app {
$self->{dir} = $name;
$self->{dir} =~ s/\:\:/-/g;
$self->{startperl} = $Config{startperl};
+ $self->{scriptgen}=$CATALYST_SCRIPT_GEN;
$self->_mk_dirs;
$self->_mk_appclass;
$self->_mk_makefile;
=head3 mk_component
+This method is called by create.pl to make new components
+for your application.
+
=cut
sub mk_component {
=head3 mk_dir
+Surprisingly, this function makes a directory.
+
=cut
sub mk_dir {
=head3 mk_file
+writes content to a file.
+
=cut
sub mk_file {
=head3 render_file
-Render and create a file from a template in DATA.
+Render and create a file from a template in DATA using
+Template Toolkit.
=cut
=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
=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
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
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__
[% startperl %] -w
-BEGIN { $ENV{CATALYST_ENGINE} = 'HTTP' }
+BEGIN {
+ $ENV{CATALYST_ENGINE} = 'HTTP';
+ $ENV{CATALYST_SCRIPT_GEN} = [% scriptgen %];
+}
use strict;
use Getopt::Long;
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
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
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
[% IF type == 'C' %]
sub default : Private {
- my ( $self, $c ) = \@_;
+ my ( $self, $c ) = @_;
$c->res->output('Congratulations, [% class %] is on Catalyst!');
}
=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