9 use Scalar::Util 'blessed';
20 if ($pkg->can('meta')) {
22 (blessed($meta) && $meta->isa('Class::MOP::Class'))
23 || confess "Whoops, not møøsey enough";
26 $meta = Class::MOP::Class->initialize($pkg);
29 $meta->alias_method('has' => sub {
30 my ($name, %options) = @_;
31 my ($init_arg) = ($name =~ /^[\$\@\%][\.\:](.*)$/);
32 $meta->add_attribute($name => (
33 init_arg => $init_arg,
38 $meta->alias_method('before' => sub {
40 $meta->add_before_method_modifier($_, $code) for @_;
43 $meta->alias_method('after' => sub {
45 $meta->add_after_method_modifier($_, $code) for @_;
48 $meta->alias_method('around' => sub { $meta->add_around_method_modifier(@_) });
50 $meta->superclasses('Moose::Object')
51 unless $meta->superclasses();
53 $meta->alias_method('confess' => \&confess);
54 $meta->alias_method('blessed' => \&blessed);
72 has '$.x' => (reader => 'x');
73 has '$.y' => (accessor => 'y');
88 after 'clear' => sub {
97 Makes Other Object Systems Envious
99 Most Other Objects Suck Eggs
101 Makes Object Orientation So Easy
103 Metacircular Object Oriented Systems Environment
107 All complex software has bugs lurking in it, and this module is no
108 exception. If you find a bug please either email me, or add the bug
113 I use L<Devel::Cover> to test the code coverage of my tests, below is the
114 L<Devel::Cover> report on this module's test suite.
116 =head1 ACKNOWLEDGEMENTS
120 Stevan Little E<lt>stevan@iinteractive.comE<gt>
122 =head1 COPYRIGHT AND LICENSE
124 Copyright 2006 by Infinity Interactive, Inc.
126 L<http://www.iinteractive.com>
128 This library is free software; you can redistribute it and/or modify
129 it under the same terms as Perl itself.