Commit | Line | Data |
---|---|---|
79cfb919 | 1 | package oo; |
2 | ||
3 | use strictures 1; | |
4 | use Moo::_Utils; | |
5 | ||
39d272e7 | 6 | sub moo { |
7 | print <<'EOMOO'; | |
8 | ______ | |
9 | < Moo! > | |
10 | ------ | |
11 | \ ^__^ | |
12 | \ (oo)\_______ | |
13 | (__)\ )\/\ | |
14 | ||----w | | |
15 | || || | |
16 | EOMOO | |
17 | exit 0; | |
18 | } | |
19 | ||
79cfb919 | 20 | BEGIN { |
21 | my $package; | |
22 | sub import { | |
39d272e7 | 23 | moo() if $0 eq '-'; |
79cfb919 | 24 | $package = $_[1] || 'Class'; |
25 | if ($package =~ /^\+/) { | |
26 | $package =~ s/^\+//; | |
27 | _load_module($package); | |
28 | } | |
29 | } | |
30 | use Filter::Simple sub { s/^/package $package;\nuse Moo;\n/; } | |
31 | } | |
32 | ||
33 | 1; |