X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=tool%2Fgenerate-mouse-tiny.pl;h=d521f9522c909e9e006d13ab8da52ccaf1087238;hp=9eb5c76f16c3f5e7bc97f7fd8b0500d4b0f94e51;hb=c10b6ba9524e57ee153bfc280cd1548aa5ee1f20;hpb=3654f7fae4d0c46857a9e2b653f8b406951fd725 diff --git a/tool/generate-mouse-tiny.pl b/tool/generate-mouse-tiny.pl index 9eb5c76..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) { @@ -99,22 +101,6 @@ package Mouse::Tiny; Mouse::Exporter->setup_import_methods(also => 'Mouse'); 1; -__END__ - -=head1 NAME - -Mouse::Tiny - Mouse in a single file - -=head1 DESCRIPTION - -Mouse::Tiny is just Mouse itself, but it is in a single file. - -This is B tiny. In fact, it requires a little more memory and time than Mouse. - -Use Mouse directly unless you know what you do. - -=cut - EOF close $handle;