CGI-Application-Structured-Tools

 view release on metacpan or  search on metacpan

lib/CGI/Application/Structured/Tools/Starter.pm  view on Meta::CPAN


This method creates C<server.pl> in the distribution's root directory.

=cut

sub create_server_pl {
    my $self = shift;

    my $fname = File::Spec->catfile( $self->{basedir}, 'server.pl' );
    $self->create_file( $fname, $self->server_pl_guts() );
    chmod 0755, ($fname);
    $self->progress("Created $fname");

    return 'server.pl';
}


=head2 create_debug_sh ()

This method creates C<debug.sh> in the distribution's root directory. Starts werver with environment set to display ::Plugin::DebugScreen on error

=cut

sub create_debug_sh {
    my $self = shift;

    my $fname = File::Spec->catfile( $self->{basedir}, 'debug.sh' );
    $self->create_file( $fname, $self->debug_sh_guts() );
    chmod 0755, ($fname);
    $self->progress("Created $fname");

    return 'debug.sh';
}

=head2 create_config_pl ()

This method creates C<config-test.pl> in the distribution's root/config directory.

=cut

lib/CGI/Application/Structured/Tools/Starter.pm  view on Meta::CPAN

        mkpath();
        $self->progress("Created $tdir");
    }

    # template needs template_path not just template dir
    $self->{template_path} = File::Spec->rel2abs( $self->{templatedir} );

    # Store template directory
    my $fname = File::Spec->catfile( $tdir, 'create_controller.pl' );
    $self->create_file( $fname, $self->create_pl_guts() );
    chmod 0755, ($fname);
    $self->progress("Created $fname");

    return 'script/create_controller.pl';
}

=head2 create_tmpl ()

This method takes all the template files ending in .tmpl (representing 
L<HTML::Template>'s and installs them into a directory under the distro tree.  
For instance if the distro was called C<Foo-Bar>, the templates would be 

lib/CGI/Application/Structured/Tools/Starter.pm  view on Meta::CPAN


    if ( not -d $tdir ) {
        local @ARGV = $tdir;
        mkpath();
        $self->progress("Created $tdir");
    }

    # create the user script
    my $fname = File::Spec->catfile( $tdir, 'create_dbic_schema.pl' );
    $self->create_file( $fname, $self->create_create_dbic_guts() );
    chmod 0755, ($fname);
    $self->progress("Created $fname");

    return 'script/create_dbic_schema.pl';
}


=head2 create_dispatch ()

Implements a L<CGI::Application::Dispatch> subclass for this app in the lib directory under the main modules directory.



( run in 0.513 second using v1.01-cache-2.11-cpan-496ff517765 )