Changeset 8953
- Timestamp:
- 04/06/08 09:02:15 (8 months ago)
- Location:
- lang
- Files:
-
- 52 modified
- 1 moved
-
lua/bluasxom/lib/List.lua (modified) (2 diffs)
-
perl/Acme-DRYCopyPaste/trunk/lib/Acme/DRYCopyPaste.pm (modified) (1 diff)
-
perl/Acme-PSON/trunk/lib/Acme/PSON.pm (modified) (1 diff)
-
perl/App-Starter/trunk/bin/app-starter-catalyst.pl (modified) (3 diffs)
-
perl/App-Starter/trunk/bin/app-starter.pl (modified) (3 diffs)
-
perl/App-Starter/trunk/lib/App/Starter.pm (modified) (7 diffs)
-
perl/Bundle-Porn/trunk/Makefile.PL (modified) (1 diff)
-
perl/Bundle-Porn/trunk/lib/Bundle/Porn.pm (modified) (2 diffs)
-
perl/Catalyst-Controller-AllowDisable/trunk/Makefile.PL (modified) (1 diff)
-
perl/Catalyst-Controller-AllowDisable/trunk/README (modified) (1 diff)
-
perl/Catalyst-Controller-AllowDisable/trunk/lib/Catalyst/Controller/AllowDisable.pm (modified) (3 diffs)
-
perl/Catalyst-Helper-Lighty/trunk/LICENSE (moved) (moved from lang/perl/Catalyst-Helper-Lighty/trunk/LISENCE)
-
perl/Catalyst-Helper-Lighty/trunk/MANIFEST (modified) (1 diff)
-
perl/Catalyst-Plugin-FormValidator-Lazy/trunk/lib/Catalyst/Plugin/FormValidator/Lazy.pm (modified) (29 diffs)
-
perl/Catalyst-Plugin-Log-Colorful/trunk/lib/Catalyst/Plugin/Log/Colorful.pm (modified) (9 diffs)
-
perl/Chaostr/trunk/extlib (modified) (1 prop)
-
perl/Chaostr/trunk/lib/Catalyst/Plugin/FormValidateEm.pm (modified) (1 diff)
-
perl/Chaostr/trunk/lib/Chaostr/ValidateEm/Plugin/String.pm (modified) (3 diffs)
-
perl/Data-LazyACL/trunk/README (modified) (1 diff)
-
perl/Data-LazyACL/trunk/lib/Data/LazyACL.pm (modified) (13 diffs)
-
perl/FormValidator-LazyWay/trunk/lib/FormValidator/LazyWay.pm (modified) (4 diffs)
-
perl/FormValidator-LazyWay/trunk/lib/FormValidator/LazyWay/Plugin.pm (modified) (1 diff)
-
perl/FormValidator-LazyWay/trunk/lib/FormValidator/LazyWay/Results.pm (modified) (4 diffs)
-
perl/Iterator-Simple/trunk/lib/Iterator/Simple.pm (modified) (15 diffs)
-
perl/MozRepl/trunk/lib/MozRepl/Plugin/JSON.pm (modified) (1 diff)
-
perl/Net-OAuth-Consumer/trunk/lib/Net/OAuth/Consumer.pm (modified) (4 diffs)
-
perl/Net-Twitter-FriendFinder/trunk/lib/Net/Twitter/FriendFinder.pm (modified) (18 diffs)
-
perl/Net-Twitter-FriendFinder/trunk/lib/Net/Twitter/FriendFinder/From/Google.pm (modified) (6 diffs)
-
perl/Net-Twitter-FriendFinder/trunk/lib/Net/Twitter/FriendFinder/From/Twitter.pm (modified) (6 diffs)
-
perl/Net-Twitter-FriendFinder/trunk/lib/Net/Twitter/FriendFinder/From/TwitterDiff.pm (modified) (5 diffs)
-
perl/Net-Twitter-FriendFinder/trunk/lib/Net/Twitter/FriendFinder/From/TwitterKensaku.pm (modified) (4 diffs)
-
perl/Net-Twitter-FriendFinder/trunk/lib/Net/Twitter/FriendFinder/From/URL.pm (modified) (4 diffs)
-
perl/OAuth-Lite/trunk/lib/OAuth/Lite/Util.pm (modified) (4 diffs)
-
perl/Sledge-Plugin-FormValidator-Lazy/trunk/lib/Sledge/Plugin/FormValidator/Lazy.pm (modified) (6 diffs)
-
perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API.pm (modified) (5 diffs)
-
perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/Base.pm (modified) (4 diffs)
-
perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/Media/Information.pm (modified) (3 diffs)
-
perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/Search/Media.pm (modified) (2 diffs)
-
perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/Search/User.pm (modified) (2 diffs)
-
perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/User/Audio.pm (modified) (2 diffs)
-
perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/User/Image.pm (modified) (3 diffs)
-
perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/User/Profile.pm (modified) (3 diffs)
-
perl/WWW-Stickam-API/trunk/lib/WWW/Stickam/API/User/Video.pm (modified) (3 diffs)
-
perl/WebService-Simple/trunk/lib/WebService/Simple.pm (modified) (1 diff)
-
perl/WebService-Simple/trunk/lib/WebService/Simple/Response.pm (modified) (1 diff)
-
perl/misc/bot-kouen-debyu.pl (modified) (10 diffs)
-
perl/misc/google_code_search.pl (modified) (9 diffs)
-
perl/misc/hatena-keyword.pl (modified) (2 diffs)
-
ruby/date_time-duration/lib/date_time/duration.rb (modified) (3 diffs)
-
ruby/osxhotkey/README (modified) (1 diff)
-
ruby/path_observer/trunk/README (modified) (3 diffs)
-
ruby/path_observer/trunk/lib/path_observer/observe_manager.rb (modified) (1 diff)
-
ruby/path_observer/trunk/lib/path_observer/observer.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/lua/bluasxom/lib/List.lua
r1200 r8953 9 9 10 10 11 SYNOPS YS11 SYNOPSIS 12 12 -------- 13 13 … … 239 239 return qsort(ret, 1, ret.n, function (data) return data end) 240 240 end, 241 241 242 242 sortBy = function (self, fun) 243 243 return self:map(function (i) -
lang/perl/Acme-DRYCopyPaste/trunk/lib/Acme/DRYCopyPaste.pm
r8950 r8953 60 60 =head1 SYNOPSIS 61 61 62 use Acme::DRYCopyPaste;62 use Acme::DRYCopyPaste; 63 63 my $d = Acme::DRYCopyPaste->new(); 64 $d->module('Perl6::Say')->copy( 50, 52)->paste();64 $d->module('Perl6::Say')->copy(50, 52)->paste(); 65 65 $d->module('CGI')->synopsis->paste(); # paste CGI SYNOPSIS 66 66 -
lang/perl/Acme-PSON/trunk/lib/Acme/PSON.pm
r2246 r8953 45 45 Acme::PSON - PSON(PerlScript Object Notation) Module 46 46 47 =head1 SYNOPS YS47 =head1 SYNOPSIS 48 48 49 49 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 2 2 3 3 use strict; … … 17 17 app-starter-catalyst.pl - App::Starter script file. 18 18 19 =head1 SYNOPS YS19 =head1 SYNOPSIS 20 20 21 21 app-starter-catalyst.pl --template --name MyApp … … 35 35 =cut 36 36 37 38 -
lang/perl/App-Starter/trunk/bin/app-starter.pl
r8492 r8953 1 #!/usr/bin/perl 1 #!/usr/bin/perl 2 2 3 3 use strict; … … 20 20 app-script.pl - App::Starter script file. 21 21 22 =head1 SYNOPS YS22 =head1 SYNOPSIS 23 23 24 24 app-script.pl --config conf/your-config.yml --name my_application … … 38 38 =cut 39 39 40 41 -
lang/perl/App-Starter/trunk/lib/App/Starter.pm
r8498 r8953 39 39 my $conf_file = ''; 40 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' ) ;41 $conf_file = File::Spec->catfile( $ENV{HOME}, '/.app-starter/conf', $config->{template} . '.yml' ) ; 42 42 } 43 43 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' ); 45 45 } 46 46 … … 112 112 if ( -d $name ) { 113 113 $name =~ s/$from//; 114 $name =~ s /^\///;114 $name =~ s{^/}{}; 115 115 push @{ $self->{dirs} }, $name; 116 116 } 117 117 else { 118 118 $name =~ s/$from//; 119 $name =~ s /^\///;119 $name =~ s{^/}{}; 120 120 push @{ $self->{files} }, $name; 121 121 } … … 129 129 App::Starter - App Starter 130 130 131 =head1 SYN PSYS131 =head1 SYNOPSIS 132 132 133 133 … … 136 136 # or 137 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 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 141 142 142 #~/.app-starter … … 154 154 =head1 DESCRIPTION 155 155 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 %]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 %] 157 157 which 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 158 158 … … 165 165 - \.svn 166 166 - \.cvs 167 replace : # rule for replace key : value 167 replace : # rule for replace key : value 168 168 module : MyApp 169 169 … … 180 180 =head1 AUTHOR 181 181 182 Tomohiro Teranishi <tomohiro.teranishi@gmail.com>182 Tomohiro Teranishi <tomohiro.teranishi@gmail.com> 183 183 184 184 dann -
lang/perl/Bundle-Porn/trunk/Makefile.PL
r2669 r8953 5 5 WriteMakefile( 6 6 NAME => 'Bundle::Porn', 7 AUTHOR => ' tomohiro.teranishi@gmail.com<tomohiro.teranishi@gmail.com>',7 AUTHOR => 'Tomohiro Teranishi <tomohiro.teranishi@gmail.com>', 8 8 VERSION_FROM => 'lib/Bundle/Porn.pm', 9 9 ABSTRACT_FROM => 'lib/Bundle/Porn.pm', -
lang/perl/Bundle-Porn/trunk/lib/Bundle/Porn.pm
r2674 r8953 17 17 Collection of Porn. Please let me know if you guys know any. 18 18 19 =head1 SYNOPS YS19 =head1 SYNOPSIS 20 20 21 perl -MCPAN -e 'install Bundle::Porn # I am feeling very horny today'21 perl -MCPAN -e'install Bundle::Porn # I am feeling very horny today' 22 22 23 23 =head1 CONTENTS … … 37 37 =cut 38 38 39 -
lang/perl/Catalyst-Controller-AllowDisable/trunk/Makefile.PL
r1856 r8953 5 5 WriteMakefile( 6 6 NAME => 'Catalyst::Controller::AllowDisable', 7 AUTHOR => 'Tomohiro teranishi <tomohiro.teranishi@gmail.com>',7 AUTHOR => 'Tomohiro Teranishi <tomohiro.teranishi@gmail.com>', 8 8 VERSION_FROM => 'lib/Catalyst/Controller/AllowDisable.pm', 9 9 ABSTRACT_FROM => 'lib/Catalyst/Controller/AllowDisable.pm', -
lang/perl/Catalyst-Controller-AllowDisable/trunk/README
r1720 r8953 31 31 COPYRIGHT AND LICENCE 32 32 33 Copyright (C) 2007 Tomohiro teranishi33 Copyright (C) 2007 Tomohiro Teranishi 34 34 35 35 This 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 28 28 Catalyst::Controller::AllowDisable - Use when you want to disable your controller. 29 29 30 =head1 SYNOPS YS30 =head1 SYNOPSIS 31 31 32 32 33 33 Package App::Web::Controller::Devel; 34 34 35 35 use base qw/Catalyst::Controller::AllowDisable/; 36 36 37 37 sub make_10000_users : Local { 38 38 39 39 } 40 40 41 41 1; 42 42 … … 49 49 =head1 DESCRIPTION 50 50 51 I sometime create controllers for developer and which are good st ff 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.51 I 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. 52 52 53 53 =head1 METHOD … … 57 57 =head1 AUTHOR 58 58 59 Tomohiro teranishi, C<< <tomohiro.teranishi at gmail.com> >>59 Tomohiro Teranishi, C<< <tomohiro.teranishi at gmail.com> >> 60 60 61 61 =head1 COPYRIGHT & LICENSE 62 62 63 Copyright 2007 Tomohiro teranishi, all rights reserved.63 Copyright 2007 Tomohiro Teranishi, all rights reserved. 64 64 65 65 This program is free software; you can redistribute it and/or modify it -
lang/perl/Catalyst-Helper-Lighty/trunk/MANIFEST
r7833 r8953 17 17 inc/Test/More.pm 18 18 lib/Catalyst/Helper/Lighty.pm 19 LI SENCE19 LICENSE 20 20 Makefile.PL 21 21 MANIFEST This list of files -
lang/perl/Catalyst-Plugin-FormValidator-Lazy/trunk/lib/Catalyst/Plugin/FormValidator/Lazy.pm
r2788 r8953 53 53 } 54 54 55 #{{{ form 55 #{{{ form 56 56 sub form { 57 57 my $c = shift; … … 102 102 my $c = shift; 103 103 my $key = shift; 104 104 105 105 if ( ref $key eq 'ARRAY') { 106 106 $c->stash->{custom_invalid} = {}; … … 110 110 $c->stash->{custom_invalid}{ $key } = 1; 111 111 } 112 113 112 } 114 113 #}}} … … 134 133 my $constraints = {}; 135 134 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 } 154 153 } 155 154 … … 174 173 } 175 174 elsif ( ref $value eq 'ARRAY' ) { 176 my $method = $value->[0]; 175 my $method = $value->[0]; 177 176 my @args = @{ $value }; 178 177 shift @args; 179 178 my $sub = $pkg . '::' . 'static' . '_' . $method ; 180 $constraints->{ $key } 181 = sub { 182 my $item = shift ; 179 $constraints->{ $key } 180 = sub { 181 my $item = shift ; 183 182 no strict; 184 183 my $result = $sub->( $item ,@args ); … … 199 198 =head1 NAME 200 199 201 Catalyst::Plugin::FormValidator::Lazy - Catalyst FormValidator Plugin in Lazy way 200 Catalyst::Plugin::FormValidator::Lazy - Catalyst FormValidator Plugin in Lazy way 202 201 203 202 =head1 DESCRIPTION 204 203 205 Instead of writting constraints in your controller source code , this plugin let you204 Instead of writting constraints in your controller source code, this plugin let you 206 205 use config file. and more... 207 206 208 =head1 SYNOPS YS209 210 use Catalyst qw( FormValidator::Lazy ); 211 207 =head1 SYNOPSIS 208 209 use Catalyst qw( FormValidator::Lazy ); 210 212 211 sub foo : Local { 213 212 my ( $s , $c ) = @_; 214 213 $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 }, 222 221 ); 223 222 224 223 return if $c->has_dfv_error ; 225 224 226 225 # do something! 227 226 } 228 227 229 228 foo.tt 230 229 231 230 <td><input type="text" name="user_name"></td> 232 <td> [% IF invalid.user_name %]User Name Is Invalid [% END -%][% IF missing.user_name %]User Name is Missing [% END -%]</td>231 <td> [% IF invalid.user_name %]User Name is Invalid [% END -%][% IF missing.user_name %]User Name is Missing [% END -%]</td> 233 232 234 233 app.yml … … 236 235 form_validator_lazy : 237 236 method_pkg : 'TestApp::Constraints' 238 regexp_map : 237 regexp_map : 239 238 '_id$' : '^\d+$' 240 '_cd$' : 239 '_cd$' : 241 240 - string 242 241 strict : 243 242 user_name : method 244 243 password : '^[a-zA-Z0-9]+$' 245 doragon : 244 doragon : 246 245 - string 247 - 10 246 - 10 248 247 loose : 249 248 user_name : method … … 268 267 my $length = shift; 269 268 270 return length $value <= $length ? 1 : 0 ; 269 return length $value <= $length ? 1 : 0 ; 271 270 } 272 271 … … 275 274 =head1 LAZY WAY 276 275 277 =head2 I want to forget about constraints. 276 =head2 I want to forget about constraints. 278 277 279 278 I am not a smart person who can think about many thing together. When I 280 cod eing controller I evernnot want to think about constraints. I want279 coding controller I ever not want to think about constraints. I want 281 280 to 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. 281 layout or whatever when I feel I want to work on constraints staff. 283 282 284 283 that is why this plugin use config file to solve this problem. … … 288 287 form_validator_lazy : 289 288 strict : 290 user_name : '^[a-zA-Z0-9]+$' 289 user_name : '^[a-zA-Z0-9]+$' 291 290 password : '^[a-zA-Z0-9]+$' 292 291 293 292 in your controller. 294 293 295 # even no constraints here , do not worry, it is ready!294 # even no constraints here, do not worry, it is ready! 296 295 $c->form( 297 296 required => [qw/user_name password/], … … 306 305 user_name : '^[a-zA-Z0-9]+$' 307 306 password : '^[a-zA-Z0-9]+$' 308 controlller_name_b: 307 controlller_name_b:
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)