&& /\.pm$/
&& !/Squirrel/
&& !/Tiny/
+ && !/Test/ # only for testing
&& !/Spec/ # has no functionality
&& !/TypeRegistry/ # deprecated
&& !/\bouse/ # ouse.pm
$contents =~ s/__END__\b.*//s; # remove documentation
$contents =~ s/1;\n*$//; # remove success indicator
+ $contents =~ s{^( (?:[ ]{4})+ )}{ "\t" x (length($1) / 4) }xmsge; # spaces to tabs
+
$mouse_tiny .= "BEGIN{ # $file\n";
$mouse_tiny .= $contents;
$mouse_tiny .= "}\n";
# This file was generated by $0 from Mouse $Mouse::Spec::VERSION.
#
# ANY CHANGES MADE HERE WILL BE LOST!
-
+use strict;
+use warnings;
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:
+# tell Perl we already have all of the Mouse files loaded:
EOF
for my $file (@files) {
} # unless Mouse.pm is loaded
EOF
-print { $handle } << 'EOF';
+print { $handle } << "EOF";
package Mouse::Tiny;
+our \$VERSION = '$Mouse::Spec::VERSION';
+
Mouse::Exporter->setup_import_methods(also => 'Mouse');
1;
-__END__
-
-=head1 NAME
-
-Mouse::Tiny - Mouse in a single file
-
-=head1 DESCRIPTION
-
-Mouse::Tiny is Mouse, but it is in a single file.
-
-This is B<not> tiny. In fact, it requires a little more memory and time than Mouse.
-
-Use Mouse directly unless you know what you do.
-
-=head1 SEE ALSO
-
-L<Mouse>
-
-=cut
-
EOF
close $handle;