X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=author%2Fgenerate-mouse-tiny.pl;h=71d6b60d91be7c942567cd2e2ab197ee01d6cb0d;hb=7801fbf000c65bbd5228728424f935b87fcd518e;hp=8f039b690e9fee39f3acf622f53a39a99544e0d1;hpb=dc8e9f34ce28e77bbd1ceb05324af02f026a69c0;p=gitmo%2FMouse.git diff --git a/author/generate-mouse-tiny.pl b/author/generate-mouse-tiny.pl index 8f039b6..71d6b60 100755 --- a/author/generate-mouse-tiny.pl +++ b/author/generate-mouse-tiny.pl @@ -7,6 +7,8 @@ use Fatal qw(open close); #use List::MoreUtils 'uniq'; #use autodie; +print "Generate Mouse::Tiny ...\n"; + sub slurp { open my $in, '<', $_[0]; local $/; @@ -40,6 +42,7 @@ find({ my $mouse_tiny = ''; for my $file (uniq + 'lib/Mouse/PurePerl.pm', 'lib/Mouse/Exporter.pm', 'lib/Mouse/Util.pm', 'lib/Mouse/Meta/TypeConstraint.pm', @@ -51,7 +54,7 @@ for my $file (uniq $contents =~ s/__END__\b.*//s; # remove documentation $contents =~ s/1;\n*$//; # remove success indicator - $mouse_tiny .= "BEGIN{ # #file\n"; + $mouse_tiny .= "BEGIN{ # $file\n"; $mouse_tiny .= $contents; $mouse_tiny .= "}\n"; } @@ -68,6 +71,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: EOF for my $file (@files) { @@ -77,8 +81,6 @@ for my $file (@files) { print { $handle } << 'EOF'; eval sprintf("#line %d %s\n", __LINE__, __FILE__) . <<'END_OF_TINY'; - -# tell Perl we already have all of the Mouse files loaded: EOF print { $handle } "\n# and now their contents\n\n"; @@ -100,3 +102,5 @@ Mouse::Exporter->setup_import_methods(also => 'Mouse'); EOF close $handle; + +print "done.\n";