- ゆるふわ
- perldoc perlstyle
- これが絶対ではない。常によい方向へ。
- 綺麗なコード=Larry Wallが書いたコード, 多くの人が書くコード
- Larryの考えは変わる。みんなも変わる。なので綺麗なコードも変わる。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Data::Dumper; | |
| use Data::Dummy; | |
| my %hash = ( | |
| id => dummy_int([1..100]), | |
| name => dummy_str(["あ".."ん"]), | |
| name_long => dummy_str(["あ".."ん"], size => 50), | |
| ); | |
| my @array = ( | |
| dummy_int([1..100]), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use utf8; | |
| use 5.10.1; | |
| package Parent { | |
| use Mouse; | |
| no Mouse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use utf8; | |
| use 5.10.1; | |
| package Parent { | |
| use Mouse; | |
| no Mouse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use utf8; | |
| use Plack::Util; | |
| use Encode; | |
| use AnyEvent; | |
| use AnyEvent::HTTP (); | |
| $AnyEvent::HTTP::MAX_PER_HOST = 20; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # in templates/root/index.tx | |
| # active_ifが真でなければ無視 | |
| # 真なら include yaminabe/name/templates/root/index.test.tx | |
| $c.yaminabe.invoke('name', 'tag'); | |
| # in yaminabe/name/templates/root/index.tag.tx | |
| <p><a href="<: uri_for('/user/like') :>">like</a></p> | |
| package Yaminabe::App::Name; | |
| use strict; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package t::Util; | |
| use strict; | |
| use warnings; | |
| use Malts::Test (); | |
| use Exporter 'import'; | |
| our @EXPORT = qw/apptest/; | |
| my $builder = Test::More->builder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cpanm (App::cpanminus) 1.5007 on perl 5.014002 built for darwin-2level | |
| Work directory is /Users/hisaichi5518/.cpanm/work/1338806361.18022 | |
| You have make /usr/bin/make | |
| You have LWP 6.02 | |
| You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3 | |
| You have /usr/bin/unzip | |
| --> Working on https://github.com/typester/Path-AttrRouter/tarball/master | |
| Fetching https://github.com/typester/Path-AttrRouter/tarball/master | |
| -> OK | |
| Unpacking master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package MyApp::Web; | |
| use 5.10.1; | |
| use strict; | |
| use warnings; | |
| use parent qw/Malts Malts::Web/; | |
| use Log::Minimal; | |
| # ...略 | |
| sub to_app { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function gomi() { | |
| cd $HOME/projects/gomi | |
| GOMI_TIME=`date +"%s"` | |
| touch "$GOMI_TIME.pl" | |
| vi "$GOMI_TIME.pl" | |
| } |