Changeset 8968 for lang/perl/App-Starter

Show
Ignore:
Timestamp:
04/06/08 10:59:16 (8 months ago)
Author:
tomyhero
Message:

lang/perl/App-Starter : fix typo

Location:
lang/perl/App-Starter/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/App-Starter/trunk/Changes

    r8498 r8968  
    11Revision history for App-Starter 
     2 
     30.09    2008-04-06/10:54 
     4        - Fix type 
    25 
    360.08    2008-03-29/15:24 
  • lang/perl/App-Starter/trunk/Makefile.PL

    r8490 r8968  
    11use inc::Module::Install; 
    2 name        'App-Starter'; 
    3 all_from    'lib/App/Starter.pm'; 
    4 requires    'Test::More'        => 0; 
    5 requires    'YAML::Syck'        => 0; 
    6 requires    'Template'          => 0; 
    7 requires    'IO::All'           => 0; 
    8 requires    'Class::Accessor'  => 0; 
    9 requires    'FindBin::libs'     => 0; 
    10 requires    'Getopt::Long'      => 0; 
     2name 'App-Starter'; 
     3all_from 'lib/App/Starter.pm'; 
     4requires 'Test::More'      => 0; 
     5requires 'YAML::Syck'      => 0; 
     6requires 'Template'        => 0; 
     7requires 'IO::All'         => 0; 
     8requires 'Class::Accessor' => 0; 
     9requires 'FindBin::libs'   => 0; 
     10requires 'Getopt::Long'    => 0; 
    1111install_script glob('bin/*.pl'); 
     12licence 'perl' => 0; 
    1213auto_install; 
    1314WriteAll; 
  • lang/perl/App-Starter/trunk/bin/app-starter-catalyst.pl

    r8953 r8968  
    1515=head1 NAME 
    1616 
    17 app-starter-catalyst.pl - App::Starter script file. 
     17app-starter-catalyst.pl - App::Starter script file for catalyst. 
    1818 
    1919=head1 SYNOPSIS 
  • lang/perl/App-Starter/trunk/lib/App/Starter.pm

    r8953 r8968  
    1313use base qw/Class::Accessor/; 
    1414 
    15 our $VERSION = '0.08'; 
     15our $VERSION = '0.09'; 
    1616 
    1717my $DIR = {}; 
     
    3838 
    3939        my $conf_file = ''; 
    40         if (-e  File::Spec->catfile( $ENV{HOME}, '/.app-starter/conf', $config->{template} . '.yml' ) ) { 
    41             $conf_file = File::Spec->catfile( $ENV{HOME}, '/.app-starter/conf', $config->{template} . '.yml' ) ; 
     40        if (-e File::Spec->catfile( 
     41                $ENV{HOME}, '/.app-starter/conf', 
     42                $config->{template} . '.yml' 
     43            ) 
     44            ) 
     45        { 
     46            $conf_file 
     47                = File::Spec->catfile( $ENV{HOME}, '/.app-starter/conf', 
     48                $config->{template} . '.yml' ); 
    4249        } 
    4350        else { 
    44             $conf_file = File::Spec->catfile( $ENV{HOME}, '/.app-starter/conf', $config->{template} . '.yaml' ); 
    45         } 
    46  
    47         $self->{config} = $conf_file ; 
     51            $conf_file 
     52                = File::Spec->catfile( $ENV{HOME}, '/.app-starter/conf', 
     53                $config->{template} . '.yaml' ); 
     54        } 
     55 
     56        $self->{config} = $conf_file; 
    4857    } 
    4958 
     
    131140=head1 SYNOPSIS 
    132141 
    133  
    134  my $app = App::Starter->new( { config => ' /home/tomyhero/work/App-Starter/conf/config.yml' } )->create; 
    135  
    136  # or 
    137  # from = 'tmp/a' , replace => { module => 'MyApp' } overwrite config.yml setting. 
    138  my $app = App::Starter->new( { config => '/home/tomyhero/work/App-Starter/conf/config.yml' , from => '/tmp/a' , name => 'my_app' , replace => { module => 'MyApp' } } )->create; 
    139  
    140  # or even you can use ~/.app-sterter 
    141  
    142  #~/.app-starter 
    143  #|-- conf 
    144  #|   `-- sample.conf 
    145  #`-- skel 
    146  #    `-- sample 
    147  #        |-- bin 
    148  #        |   `-- __app__.pl 
    149  #        `-- lib 
    150  #            `-- __app__ 
    151  #                `-- Foo.pm 
    152  my $app = App::Starter->new( { template => 'sample' , name =>'foo'  } )->create; 
     142    my $app 
     143        = App::Starter->new( 
     144        { config => ' /tmp/conf/config.yml' } ) 
     145        ->create; 
     146     
     147    # or 
     148    # from = 'tmp/a' , replace => { module => 'MyApp' } overwrite config.yml setting. 
     149    my $app = App::Starter->new( 
     150        {   config  => '/tmp/conf/config.yml', 
     151            from    => '/tmp/a', 
     152            name    => 'my_app', 
     153            replace => { module => 'MyApp' } 
     154        } 
     155    )->create; 
     156     
     157    # or even you can use ~/.app-sterter so taht you do not need to hve from and config options 
     158     
     159    #~/.app-starter 
     160    #|-- conf 
     161    #|   `-- sample.conf 
     162    #`-- skel 
     163    #    `-- sample 
     164    #        |-- bin 
     165    #        |   `-- __app__.pl 
     166    #        `-- lib 
     167    #            `-- __app__ 
     168    #                `-- Foo.pm 
     169    my $app 
     170        = App::Starter->new( { template => 'sample', name => 'foo' } )->create; 
    153171 
    154172=head1 DESCRIPTION 
     
    156174you can start your application quickly once you craete skelton with this module. This module only does is rename key to value. in your template file, you can set like this  [% key_name %] 
    157175which replace with value you set in config. and also you can use __key_name__ format as file or directory name which replace as rule you set at config 
     176 
     177I recommend to use ~/.app-starter directory to store your app-starter data 
    158178 
    159179=head1 CONFIG 
     
    172192=head2 new 
    173193 
    174  constractor 
     194constractor 
    175195 
    176196=head2 create 
     
    184204dann 
    185205 
     206=head1 COPYRIGHT AND LISENCE 
     207 
     208Copyright (c) Tomohiro Teranishi, All rights reserved. 
     209 
     210This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.  See L<perlartistic>. 
     211 
    186212=cut