X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=author%2Fgenerate-mouse-tiny.pl;h=0484cdba735fc6b230e5e614c532e89032c6e1db;hb=7c738ee513510237e009e456c0b09a82c836a84a;hp=f594601246ecfddc6c4c5d81413db41576e197ef;hpb=c9ef7f3defc89a70dbb77b687276e933a4902fed;p=gitmo%2FMouse.git diff --git a/author/generate-mouse-tiny.pl b/author/generate-mouse-tiny.pl index f594601..0484cdb 100755 --- a/author/generate-mouse-tiny.pl +++ b/author/generate-mouse-tiny.pl @@ -4,8 +4,10 @@ use warnings; use File::Find; use File::Slurp 'slurp'; use List::MoreUtils 'uniq'; +use autodie; -unlink 'lib/Mouse/Tiny.pm'; +unlink 'lib/Mouse/Tiny.pm' + if -e 'lib/Mouse/Tiny.pm'; my @files; @@ -13,8 +15,10 @@ find({ wanted => sub { push @files, $_ if -f $_ - && !/Squirrel|MouseX|\.sw[po]$/ + && !/Squirrel/ + && !/TypeRegistory/ && !/\bouse/ + && !/\.sw[po]$/ }, no_chdir => 1, }, 'lib'); @@ -40,7 +44,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 @@ -54,7 +58,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;