oo!
Matt S Trout [Sun, 14 Nov 2010 03:02:19 +0000 (03:02 +0000)]
lib/oo.pm [new file with mode: 0644]

diff --git a/lib/oo.pm b/lib/oo.pm
new file mode 100644 (file)
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;