X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=author%2Fimport-moose-test.pl;fp=author%2Fimport-moose-test.pl;h=559b8d31639028668bd4e28ccdabc0064bbd5500;hp=a0ad424add1532b0e8c09bf0945657185474cb9b;hb=fde8e43f95fe996fbc2a778aa259feeb04552171;hpb=0bdc9d38dfd3de07aad929f6629f8fa65d434c27 diff --git a/author/import-moose-test.pl b/author/import-moose-test.pl index a0ad424..559b8d3 100644 --- a/author/import-moose-test.pl +++ b/author/import-moose-test.pl @@ -8,12 +8,9 @@ use autodie; my($moose_dir, $result) = @ARGV; unless(defined $moose_dir and -d "$moose_dir/t") { - die "Usage: $0 Moose-dir result-dir\n"; -} -$result //= 'Moose-test'; -if(-e $result) { - die "'$result' exists, stopped"; + die "Usage: $0 Moose-dir [result-dir]\n"; } +$result //= 't'; my @tests; sub wanted { @@ -75,6 +72,8 @@ sub copy_as_mouse { while(<$in>) { if($. == 2) { + say $out "# This is automatically generated by $0."; + say $out "# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!"; say $out 'use t::lib::MooseCompat;'; } s/\b Class::MOP::([a-z_]+) \b/Mouse::Util::$1/xmsg;