X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=author%2Fgenerate-mouse-tiny.pl;h=e2925438d54f02fa848610434e01f41a9132616b;hb=refs%2Ftags%2F0.24;hp=3719a288f49ca1be3e624aa9fa05f553fc144fbf;hpb=7e38a8416a8658b6551f16cf5728bd3d0457c163;p=gitmo%2FMouse.git diff --git a/author/generate-mouse-tiny.pl b/author/generate-mouse-tiny.pl index 3719a28..e292543 100755 --- a/author/generate-mouse-tiny.pl +++ b/author/generate-mouse-tiny.pl @@ -10,7 +10,13 @@ unlink 'lib/Mouse/Tiny.pm'; my @files; find({ - wanted => sub { push @files, $_ if -f $_ && !/Squirrel|MouseX|\.sw[po]$/ }, + wanted => sub { + push @files, $_ + if -f $_ + && !/Squirrel/ + && !/\bouse/ + && !/\.sw[po]$/ + }, no_chdir => 1, }, 'lib'); @@ -21,7 +27,6 @@ for my $file (uniq 'lib/Mouse/Util.pm', sort @files) { $contents =~ s/__END__\b.*//s; # remove documentation $contents =~ s/1;\n*$//; # remove success indicator - $contents =~ s/^.*\n//; # remove shebang $contents =~ s/^use Mouse\S*\s*\n//mg; # we're already loading everything $contents =~ s/^use (Mouse\S*)\s*(.+);/BEGIN { $1->import($2) }/mg; @@ -36,7 +41,7 @@ print { $handle } << 'EOF'; # if regular Mouse is loaded, bail out unless ($INC{'Mouse.pm'}) { -eval q{ +eval <<'END_OF_TINY'; # tell Perl we already have all of the Mouse files loaded: EOF @@ -50,7 +55,7 @@ print { $handle } "\n# and now their contents\n\n"; print { $handle } $mouse_tiny; -print { $handle } "}; #eval\n} #unless\n\n"; +print { $handle } "END_OF_TINY\n} #unless\n\n"; print { $handle } << 'EOF'; package Mouse::Tiny;