From: Matt S Trout Date: Sun, 14 Nov 2010 03:02:19 +0000 (+0000) Subject: oo! X-Git-Tag: 0.009001~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=79cfb9196cd7a461ed8349a9d169b482ba4c25ad;p=gitmo%2FRole-Tiny.git oo! --- diff --git a/lib/oo.pm b/lib/oo.pm new file mode 100644 index 0000000..d73128d --- /dev/null +++ b/lib/oo.pm @@ -0,0 +1,18 @@ +package oo; + +use strictures 1; +use Moo::_Utils; + +BEGIN { + my $package; + sub import { + $package = $_[1] || 'Class'; + if ($package =~ /^\+/) { + $package =~ s/^\+//; + _load_module($package); + } + } + use Filter::Simple sub { s/^/package $package;\nuse Moo;\n/; } +} + +1;