Commit | Line | Data |
---|---|---|
79cfb919 | 1 | package oo; |
2 | ||
3 | use strictures 1; | |
4 | use Moo::_Utils; | |
5 | ||
6 | BEGIN { | |
7 | my $package; | |
8 | sub import { | |
9 | $package = $_[1] || 'Class'; | |
10 | if ($package =~ /^\+/) { | |
11 | $package =~ s/^\+//; | |
12 | _load_module($package); | |
13 | } | |
14 | } | |
15 | use Filter::Simple sub { s/^/package $package;\nuse Moo;\n/; } | |
16 | } | |
17 | ||
18 | 1; |