From: gfx Date: Fri, 5 Feb 2010 09:15:09 +0000 (+0900) Subject: Make Mouse::Tiny smaller X-Git-Tag: 0.50~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c10b6ba9524e57ee153bfc280cd1548aa5ee1f20;p=gitmo%2FMouse.git Make Mouse::Tiny smaller --- diff --git a/tool/generate-mouse-tiny.pl b/tool/generate-mouse-tiny.pl index 71d6b60..d521f95 100644 --- a/tool/generate-mouse-tiny.pl +++ b/tool/generate-mouse-tiny.pl @@ -54,6 +54,8 @@ for my $file (uniq $contents =~ s/__END__\b.*//s; # remove documentation $contents =~ s/1;\n*$//; # remove success indicator + $contents =~ s{^( (?:[ ]{4})+ )}{ "\t" x (length($1) / 4) }xmsge; # spaces to tabs + $mouse_tiny .= "BEGIN{ # $file\n"; $mouse_tiny .= $contents; $mouse_tiny .= "}\n"; @@ -71,7 +73,7 @@ EOF print { $handle } << 'EOF'; # if regular Mouse is loaded, bail out unless ($INC{'Mouse.pm'}) { - # tell Perl we already have all of the Mouse files loaded: +# tell Perl we already have all of the Mouse files loaded: EOF for my $file (@files) {