- Plack::Middleware::Compile
- coffee, sass, less等をcompileするけど、自分で設定をごりごり書く
- concatはしてくれない
- Plack::Middleware::StaticShared
- 一番良い感じ
- versioningとcacheにも対応
- URLが独特で気持ち悪い
./shared.js:v1:/js/foolib.js,/js/barlib.js
- URLでconcatするファイルを指定できるので、複数のパターンでconcatすることもできる
- concatはurlから自動で行う
- minifyは自分でfilterを設定する必要あり
This file contains 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.6916 on perl 5.018000 built for darwin-2level | |
Work directory is /Users/ysasaki/.cpanm/work/1371470301.3213 | |
You have make /usr/bin/make | |
You have LWP 6.05 | |
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3 | |
You have /usr/bin/unzip | |
Searching CSS::Sass on cpanmetadb ... | |
--> Working on CSS::Sass | |
Fetching http://search.cpan.org/CPAN/authors/id/D/DA/DAVID/CSS-Sass-v0.3.0.tar.gz ... OK | |
Unpacking CSS-Sass-v0.3.0.tar.gz |
This file contains 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 utf8; | |
use strict; | |
use warnings; | |
use Test::More; | |
use Test::Name::FromLine; | |
sub return_only { return } | |
sub return_undef { return undef } | |
subtest 'scalar context' => sub { |
This file contains 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 feature 'say'; | |
use Benchmark 'cmpthese'; | |
use Errno; | |
open my $fh, '<', 'no-such-file'; | |
cmpthese( | |
0, | |
{ 'tie' => sub { $!{ENOENT} }, |
This file contains 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
# Minillaでテスト用のdistを作成 | |
vm-ubuntu /tmp% minil new Foo | |
Writing lib/Foo.pm | |
Writing Changes | |
Writing t/00_compile.t | |
Writing .travis.yml | |
Writing .gitignore | |
Writing LICENSE | |
Writing cpanfile | |
Initializing git Foo |
This file contains 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 feature qw/say/; | |
sub my_map(&@) { | |
my ( $block, @list ) = @_; | |
$block->($_) for @list; | |
} | |
my @list = qw(foo bar); |
This file contains 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 -L local/ -v Text::[email protected] | |
cpanm (App::cpanminus) 1.6914 on perl 5.014002 built for i686-linux | |
Work directory is /home/ysasaki/.cpanm/work/1370846095.23203 | |
You have make /usr/bin/make | |
You have LWP 6.03 | |
You have /bin/tar: tar (GNU tar) 1.26 | |
Copyright (C) 2011 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. |
This file contains 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
perlsource() { | |
if [ $# -ne 0 ]; then | |
perldoc -m $1 | view - +"set filetype=perl" | |
else | |
echo "Usage: perlsource MODULE" | |
fi | |
} |
This file contains 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
ysasaki@mba02 ysasaki% vim --version | |
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02) | |
Compiled by [email protected] | |
Normal version without GUI. Features included (+) or not (-): | |
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent | |
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments | |
-conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs | |
-dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path | |
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv | |
+insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent |
This file contains 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 utf8; | |
use strict; | |
use warnings; | |
use Test::More; | |
use Test::Name::FromLine; | |
use Test::TCP; | |
use Net::SMTP; | |
use Net::SMTP::Server; | |
use Net::SMTP::Server::Client; |