X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=author%2Fgenerate-mouse-tiny.pl;h=265cd16078ac11ca10e3540bcb92786c01ef076c;hb=bb3f31b1dbdb50a00a80d833b15d1f45922e6096;hp=3110274bc0e047dc38977c0dba24a8388836c0bd;hpb=347a0225196973a108bde2b996a07f0afa24ae9b;p=gitmo%2FMouse.git diff --git a/author/generate-mouse-tiny.pl b/author/generate-mouse-tiny.pl index 3110274..265cd16 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/ }, + 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; @@ -32,7 +37,6 @@ for my $file (uniq 'lib/Mouse/Util.pm', sort @files) { open my $handle, '>lib/Mouse/Tiny.pm' or die "Can't write lib/Mouse/Tiny.pm: $!"; print { $handle } << 'EOF'; -#!/usr/bin/env perl # THIS FILE IS AUTOGENERATED! # if regular Mouse is loaded, bail out