From: Matt S Trout Date: Tue, 16 Nov 2010 03:25:50 +0000 (+0000) Subject: Make perl -Moo DTRT X-Git-Tag: 0.009002~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=39d272e7972be7a1efb5ee0e49cd0b4e4cd72c7b;p=gitmo%2FRole-Tiny.git Make perl -Moo DTRT --- diff --git a/Changes b/Changes index 951f892..149112c 100644 --- a/Changes +++ b/Changes @@ -1,2 +1,4 @@ + - Make 'perl -Moo' DTRT + 0.009001 Tue Nov 16 2010 - Initial release diff --git a/lib/oo.pm b/lib/oo.pm index d73128d..e1ea141 100644 --- a/lib/oo.pm +++ b/lib/oo.pm @@ -3,9 +3,24 @@ package oo; use strictures 1; use Moo::_Utils; +sub moo { + print <<'EOMOO'; + ______ +< Moo! > + ------ + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || +EOMOO + exit 0; +} + BEGIN { my $package; sub import { + moo() if $0 eq '-'; $package = $_[1] || 'Class'; if ($package =~ /^\+/) { $package =~ s/^\+//;