Changeset 8953

Show
Ignore:
Timestamp:
04/06/08 09:02:15 (8 months ago)
Author:
drry
Message:

lang/ruby/path_observer/trunk/lib/path_observer/observe_manager.rb
lang/ruby/path_observer/trunk/lib/path_observer/observer.rb
lang/ruby/path_observer/trunk/README
lang/ruby/date_time-duration/lib/date_time/duration.rb
lang/ruby/osxhotkey/README
lang/lua/bluasxom/lib/List.lua
lang/perl/Catalyst-Controller-AllowDisable?/trunk/lib/Catalyst/Controller/AllowDisable.pm
lang/perl/Catalyst-Controller-AllowDisable?/trunk/Makefile.PL
lang/perl/Catalyst-Controller-AllowDisable?/trunk/README
lang/perl/Catalyst-Helper-Lighty/trunk/LISENCE
lang/perl/Catalyst-Helper-Lighty/trunk/LICENSE
lang/perl/Catalyst-Helper-Lighty/trunk/MANIFEST
lang/perl/Catalyst-Plugin-FormValidator?-Lazy/trunk/lib/Catalyst/Plugin/FormValidator/Lazy.pm
lang/perl/Catalyst-Plugin-Log-Colorful/trunk/lib/Catalyst/Plugin/Log/Colorful.pm
lang/perl/WebService-Simple/trunk/lib/WebService/Simple.pm
lang/perl/WebService-Simple/trunk/lib/WebService/Simple/Response.pm
lang/perl/misc/bot-kouen-debyu.pl
lang/perl/misc/google_code_search.pl
lang/perl/misc/hatena-keyword.pl
lang/perl/Sledge-Plugin-FormValidator?-Lazy/trunk/lib/Sledge/Plugin/FormValidator/Lazy.pm
lang/perl/Net-OAuth-Consumer/trunk/lib/Net/OAuth/Consumer.pm
lang/perl/Net-Twitter-FriendFinder?/trunk/lib/Net/Twitter/FriendFinder/From/TwitterKensaku.pm
lang/perl/Net-Twitter-FriendFinder?/trunk/lib/Net/Twitter/FriendFinder/From/TwitterDiff.pm
lang/perl/Net-Twitter-FriendFinder?/trunk/lib/Net/Twitter/FriendFinder/From/Google.pm
lang/perl/Net-Twitter-FriendFinder?/trunk/lib/Net/Twitter/FriendFinder/From/Twitter.pm
lang/perl/Net-Twitter-FriendFinder?/trunk/lib/Net/Twitter/FriendFinder/From/URL.pm
lang/perl/Net-Twitter-FriendFinder?/trunk/lib/Net/Twitter/FriendFinder.pm
lang/perl/Data-LazyACL/trunk/lib/Data/LazyACL.pm
lang/perl/Data-LazyACL/trunk/README
lang/perl/Iterator-Simple/trunk/lib/Iterator/Simple.pm
lang/perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API.pm
lang/perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/Media/Information.pm
lang/perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/Search/User.pm
lang/perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/Search/Media.pm
lang/perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/Base.pm
lang/perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/User/Video.pm
lang/perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/User/Profile.pm
lang/perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/User/Audio.pm
lang/perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/User/Image.pm
lang/perl/Bundle-Porn/trunk/lib/Bundle/Porn.pm
lang/perl/Bundle-Porn/trunk/Makefile.PL
lang/perl/App-Starter/trunk/lib/App/Starter.pm
lang/perl/App-Starter/trunk/bin/app-starter.pl
lang/perl/App-Starter/trunk/bin/app-starter-catalyst.pl
lang/perl/Chaostr/trunk/lib/Chaostr/ValidateEm/Plugin/String.pm
lang/perl/Chaostr/trunk/lib/Catalyst/Plugin/FormValidateEm.pm
lang/perl/Chaostr/trunk/extlib
lang/perl/Acme-PSON/trunk/lib/Acme/PSON.pm
lang/perl/Acme-DRYCopyPaste/trunk/lib/Acme/DRYCopyPaste.pm
lang/perl/OAuth-Lite/trunk/lib/OAuth/Lite/Util.pm
lang/perl/MozRepl/trunk/lib/MozRepl/Plugin/JSON.pm
lang/perl/FormValidator-LazyWay?/trunk/lib/FormValidator/LazyWay/Plugin.pm
lang/perl/FormValidator-LazyWay?/trunk/lib/FormValidator/LazyWay/Results.pm
lang/perl/FormValidator-LazyWay?/trunk/lib/FormValidator/LazyWay.pm:

  • SYNOPSIS
Location:
lang
Files:
52 modified
1 moved

Legend:

Unmodified
Added
Removed
  • lang/lua/bluasxom/lib/List.lua

    r1200 r8953  
    99 
    1010 
    11 SYNOPSYS 
     11SYNOPSIS 
    1212-------- 
    1313 
     
    239239                return qsort(ret, 1, ret.n, function (data) return data end) 
    240240        end, 
    241          
     241 
    242242        sortBy = function (self, fun) 
    243243                return self:map(function (i) 
  • lang/perl/Acme-DRYCopyPaste/trunk/lib/Acme/DRYCopyPaste.pm

    r8950 r8953  
    6060=head1 SYNOPSIS 
    6161 
    62  use  Acme::DRYCopyPaste; 
     62 use Acme::DRYCopyPaste; 
    6363 my $d = Acme::DRYCopyPaste->new(); 
    64  $d->module('Perl6::Say')->copy( 50, 52)->paste(); 
     64 $d->module('Perl6::Say')->copy(50, 52)->paste(); 
    6565 $d->module('CGI')->synopsis->paste(); # paste CGI SYNOPSIS 
    6666 
  • lang/perl/Acme-PSON/trunk/lib/Acme/PSON.pm

    r2246 r8953  
    4545Acme::PSON - PSON(PerlScript Object Notation) Module 
    4646 
    47 =head1 SYNOPSYS 
     47=head1 SYNOPSIS 
    4848 
    4949 use PSON qw(obj2pson pson2obj); 
  • lang/perl/App-Starter/trunk/bin/app-starter-catalyst.pl

    r8492 r8953  
    1 #!/usr/bin/perl  
     1#!/usr/bin/perl 
    22 
    33use strict; 
     
    1717app-starter-catalyst.pl - App::Starter script file. 
    1818 
    19 =head1 SYNOPSYS 
     19=head1 SYNOPSIS 
    2020 
    2121 app-starter-catalyst.pl --template  --name MyApp 
     
    3535=cut 
    3636 
    37  
    38  
  • lang/perl/App-Starter/trunk/bin/app-starter.pl

    r8492 r8953  
    1 #!/usr/bin/perl  
     1#!/usr/bin/perl 
    22 
    33use strict; 
     
    2020app-script.pl - App::Starter script file. 
    2121 
    22 =head1 SYNOPSYS 
     22=head1 SYNOPSIS 
    2323 
    2424 app-script.pl --config conf/your-config.yml --name my_application 
     
    3838=cut 
    3939 
    40  
    41  
  • lang/perl/App-Starter/trunk/lib/App/Starter.pm

    r8498 r8953  
    3939        my $conf_file = ''; 
    4040        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' ) ;     
     41            $conf_file = File::Spec->catfile( $ENV{HOME}, '/.app-starter/conf', $config->{template} . '.yml' ) ; 
    4242        } 
    4343        else { 
    44             $conf_file = File::Spec->catfile(  $ENV{HOME}, '/.app-starter/conf', $config->{template} . '.yaml' ); 
     44            $conf_file = File::Spec->catfile( $ENV{HOME}, '/.app-starter/conf', $config->{template} . '.yaml' ); 
    4545        } 
    4646 
     
    112112    if ( -d $name ) { 
    113113        $name =~ s/$from//; 
    114         $name =~ s/^\///; 
     114        $name =~ s{^/}{}; 
    115115        push @{ $self->{dirs} }, $name; 
    116116    } 
    117117    else { 
    118118        $name =~ s/$from//; 
    119         $name =~ s/^\///; 
     119        $name =~ s{^/}{}; 
    120120        push @{ $self->{files} }, $name; 
    121121    } 
     
    129129App::Starter - App Starter 
    130130 
    131 =head1 SYNPSYS 
     131=head1 SYNOPSIS 
    132132 
    133133 
     
    136136 # or 
    137137 # 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  
     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 
    141141 
    142142 #~/.app-starter 
     
    154154=head1 DESCRIPTION 
    155155 
    156 you 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 %] 
     156you 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 %] 
    157157which 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 
    158158 
     
    165165    - \.svn 
    166166    - \.cvs 
    167  replace :   # rule for replace key : value  
     167 replace :   # rule for replace key : value 
    168168    module : MyApp 
    169169 
     
    180180=head1 AUTHOR 
    181181 
    182 Tomohiro Teranishi<tomohiro.teranishi@gmail.com> 
     182Tomohiro Teranishi <tomohiro.teranishi@gmail.com> 
    183183 
    184184dann 
  • lang/perl/Bundle-Porn/trunk/Makefile.PL

    r2669 r8953  
    55WriteMakefile( 
    66    NAME                => 'Bundle::Porn', 
    7     AUTHOR              => 'tomohiro.teranishi@gmail.com <tomohiro.teranishi@gmail.com>', 
     7    AUTHOR              => 'Tomohiro Teranishi <tomohiro.teranishi@gmail.com>', 
    88    VERSION_FROM        => 'lib/Bundle/Porn.pm', 
    99    ABSTRACT_FROM       => 'lib/Bundle/Porn.pm', 
  • lang/perl/Bundle-Porn/trunk/lib/Bundle/Porn.pm

    r2674 r8953  
    1717Collection of Porn. Please let me know if you guys know any. 
    1818 
    19 =head1 SYNOPSYS 
     19=head1 SYNOPSIS 
    2020 
    21 perl -MCPAN -e 'install Bundle::Porn # I am feeling very horny today' 
     21perl -MCPAN -e'install Bundle::Porn # I am feeling very horny today' 
    2222 
    2323=head1 CONTENTS 
     
    3737=cut 
    3838 
    39  
  • lang/perl/Catalyst-Controller-AllowDisable/trunk/Makefile.PL

    r1856 r8953  
    55WriteMakefile( 
    66    NAME                => 'Catalyst::Controller::AllowDisable', 
    7     AUTHOR              => 'Tomohiro teranishi <tomohiro.teranishi@gmail.com>', 
     7    AUTHOR              => 'Tomohiro Teranishi <tomohiro.teranishi@gmail.com>', 
    88    VERSION_FROM        => 'lib/Catalyst/Controller/AllowDisable.pm', 
    99    ABSTRACT_FROM       => 'lib/Catalyst/Controller/AllowDisable.pm', 
  • lang/perl/Catalyst-Controller-AllowDisable/trunk/README

    r1720 r8953  
    3131COPYRIGHT AND LICENCE 
    3232 
    33 Copyright (C) 2007 Tomohiro teranishi 
     33Copyright (C) 2007 Tomohiro Teranishi 
    3434 
    3535This program is free software; you can redistribute it and/or modify it 
  • lang/perl/Catalyst-Controller-AllowDisable/trunk/lib/Catalyst/Controller/AllowDisable.pm

    r1856 r8953  
    2828Catalyst::Controller::AllowDisable - Use when you want to disable your controller. 
    2929 
    30 =head1 SYNOPSYS 
     30=head1 SYNOPSIS 
    3131 
    3232 
    3333    Package App::Web::Controller::Devel; 
    34      
     34 
    3535    use base qw/Catalyst::Controller::AllowDisable/; 
    36      
     36 
    3737    sub make_10000_users : Local { 
    38      
     38 
    3939    } 
    40      
     40 
    4141    1; 
    4242 
     
    4949=head1 DESCRIPTION 
    5050 
    51 I sometime create controllers for developer and which are good stff but I do not want to ship it to production but I do not want to remove it also. So I create this controller module. You can disable controller which using this module using on_controller_disable=1 at config.  
     51I sometime create controllers for developer and which are good staff but I do not want to ship it to production but I do not want to remove it also. So I create this controller module. You can disable controller which using this module using on_controller_disable=1 at config. 
    5252 
    5353=head1 METHOD 
     
    5757=head1 AUTHOR 
    5858 
    59 Tomohiro teranishi, C<< <tomohiro.teranishi at gmail.com> >> 
     59Tomohiro Teranishi, C<< <tomohiro.teranishi at gmail.com> >> 
    6060 
    6161=head1 COPYRIGHT & LICENSE 
    6262 
    63 Copyright 2007 Tomohiro teranishi, all rights reserved. 
     63Copyright 2007 Tomohiro Teranishi, all rights reserved. 
    6464 
    6565This program is free software; you can redistribute it and/or modify it 
  • lang/perl/Catalyst-Helper-Lighty/trunk/MANIFEST

    r7833 r8953  
    1717inc/Test/More.pm 
    1818lib/Catalyst/Helper/Lighty.pm 
    19 LISENCE 
     19LICENSE 
    2020Makefile.PL 
    2121MANIFEST                        This list of files 
  • lang/perl/Catalyst-Plugin-FormValidator-Lazy/trunk/lib/Catalyst/Plugin/FormValidator/Lazy.pm

    r2788 r8953  
    5353} 
    5454 
    55 #{{{ form  
     55#{{{ form 
    5656sub form { 
    5757    my $c = shift; 
     
    102102    my $c   = shift; 
    103103    my $key = shift; 
    104     
     104 
    105105    if ( ref $key eq 'ARRAY') { 
    106106        $c->stash->{custom_invalid} = {}; 
     
    110110        $c->stash->{custom_invalid}{ $key } = 1; 
    111111    } 
    112  
    113112} 
    114113#}}} 
     
    134133    my $constraints = {}; 
    135134    foreach my $key ( keys %{ $data } ) { 
    136              my $value = $data->{ $key } ; 
    137              if( ref $value eq 'ARRAY' ) { 
    138                 my $method = $value->[0];  
    139                 my @args = @{ $value }; 
    140                 shift @args; 
    141                 my $sub =  $pkg . '::' . 'static' .  '_' .  $method  ; 
    142                 $constraints->{ qr/$key/ }  
    143                     = sub {  
    144                         my $item = shift ;  
    145                         no strict; 
    146                         my $result =  $sub->( $item  ,@args ); 
    147                         return $result; 
    148                       } 
    149                     ; 
    150              } 
    151              else { 
    152                 $constraints->{ qr/$key/ } = qr/$value/; 
    153              } 
     135        my $value = $data->{ $key } ; 
     136        if( ref $value eq 'ARRAY' ) { 
     137            my $method = $value->[0]; 
     138            my @args = @{ $value }; 
     139            shift @args; 
     140            my $sub =  $pkg . '::' . 'static' .  '_' .  $method  ; 
     141            $constraints->{ qr/$key/ } 
     142                = sub { 
     143                    my $item = shift ; 
     144                    no strict; 
     145                    my $result =  $sub->( $item , @args ); 
     146                    return $result; 
     147                  } 
     148                ; 
     149        } 
     150        else { 
     151            $constraints->{ qr/$key/ } = qr/$value/; 
     152        } 
    154153    } 
    155154 
     
    174173        } 
    175174        elsif ( ref $value eq 'ARRAY' ) { 
    176             my $method = $value->[0];  
     175            my $method = $value->[0]; 
    177176            my @args = @{ $value }; 
    178177            shift @args; 
    179178            my $sub =  $pkg . '::' . 'static' .  '_' .  $method  ; 
    180             $constraints->{ $key }  
    181                 = sub {  
    182                     my $item = shift ;  
     179            $constraints->{ $key } 
     180                = sub { 
     181                    my $item = shift ; 
    183182                    no strict; 
    184183                    my $result =  $sub->( $item  ,@args ); 
     
    199198=head1 NAME 
    200199 
    201 Catalyst::Plugin::FormValidator::Lazy - Catalyst FormValidator Plugin in Lazy way  
     200Catalyst::Plugin::FormValidator::Lazy - Catalyst FormValidator Plugin in Lazy way 
    202201 
    203202=head1 DESCRIPTION 
    204203 
    205 Instead of writting constraints in your controller source code , this plugin let you 
     204Instead of writting constraints in your controller source code, this plugin let you 
    206205use config file. and more... 
    207206 
    208 =head1 SYNOPSYS 
    209  
    210  use Catalyst qw( FormValidator::Lazy );  
    211   
     207=head1 SYNOPSIS 
     208 
     209 use Catalyst qw( FormValidator::Lazy ); 
     210 
    212211 sub foo : Local { 
    213212    my ( $s , $c ) = @_; 
    214213    $c->form( 
    215         required            => [qw/user_name password monster/], 
    216         constraints_loose   => [qw/user_name/], 
    217         custom_parameters   => { 
    218                                     user_name => 'tomyhero', 
    219                                     password  => 'hi_mom',  
    220                                     monster   => 'doragon', 
    221                                 }, 
     214        required          => [qw/user_name password monster/], 
     215        constraints_loose => [qw/user_name/], 
     216        custom_parameters => { 
     217                                user_name => 'tomyhero', 
     218                                password  => 'hi_mom', 
     219                                monster   => 'doragon', 
     220                             }, 
    222221     ); 
    223       
     222 
    224223     return if $c->has_dfv_error ; 
    225224 
    226225    # do something! 
    227226 } 
    228   
     227 
    229228foo.tt 
    230229 
    231230    <td><input type="text" name="user_name"></td> 
    232     <td>&nbsp;[% IF invalid.user_name %]User Name Is Invalid [% END -%][% IF missing.user_name %]User Name is Missing [% END -%] </td> 
     231    <td>&nbsp;[% IF invalid.user_name %]User Name is Invalid [% END -%][% IF missing.user_name %]User Name is Missing [% END -%]</td> 
    233232 
    234233app.yml 
     
    236235 form_validator_lazy : 
    237236    method_pkg : 'TestApp::Constraints' 
    238     regexp_map :  
     237    regexp_map : 
    239238        '_id$' : '^\d+$' 
    240         '_cd$' :  
     239        '_cd$' : 
    241240            - string 
    242241    strict     : 
    243242        user_name : method 
    244243        password  : '^[a-zA-Z0-9]+$' 
    245         doragon   :  
     244        doragon   : 
    246245            - string 
    247             - 10  
     246            - 10 
    248247   loose       : 
    249248        user_name : method 
     
    268267    my $length = shift; 
    269268 
    270     return length $value <= $length ? 1 : 0 ;  
     269    return length $value <= $length ? 1 : 0 ; 
    271270 } 
    272271 
     
    275274=head1 LAZY WAY 
    276275 
    277 =head2 I want to forget about constraints.  
     276=head2 I want to forget about constraints. 
    278277 
    279278I am not a smart person who can think about many thing together. When I 
    280 codeing controller I evern not want to think about constraints. I want 
     279coding controller I ever not want to think about constraints. I want 
    281280to write constraints when I finish everything or when I finish design DB 
    282 layout or whatever when I feel I want to work on constraints staff.  
     281layout or whatever when I feel I want to work on constraints staff. 
    283282 
    284283that is why this plugin use config file to solve this problem. 
     
    288287 form_validator_lazy : 
    289288    strict     : 
    290         user_name : '^[a-zA-Z0-9]+$'  
     289        user_name : '^[a-zA-Z0-9]+$' 
    291290        password  : '^[a-zA-Z0-9]+$' 
    292291 
    293292in your controller. 
    294293 
    295     # even no constraints here , do not worry , it is ready! 
     294    # even no constraints here, do not worry, it is ready! 
    296295    $c->form( 
    297296        required => [qw/user_name password/], 
     
    306305    user_name : '^[a-zA-Z0-9]+$' 
    307306    password  : '^[a-zA-Z0-9]+$' 
    308  controlller_name_b:  
     307 controlller_name_b: