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 { $meta->add_before_method_modifier(@_) });
39 $meta->alias_method('after' => sub { $meta->add_after_method_modifier(@_) });
40 $meta->alias_method('around' => sub { $meta->add_around_method_modifier(@_) });
42 $meta->superclasses('Moose::Object')
43 unless $meta->superclasses();
61 has '$.x' => (reader => 'x');
62 has '$.y' => (accessor => 'y');
77 after 'clear' => sub {
86 Makes Other Object Systems Envious
88 Most Other Objects Suck Eggs
90 Makes Object Orientation So Easy
92 Metacircular Object Oriented Systems Environment
96 All complex software has bugs lurking in it, and this module is no
97 exception. If you find a bug please either email me, or add the bug
102 I use L<Devel::Cover> to test the code coverage of my tests, below is the
103 L<Devel::Cover> report on this module's test suite.
105 =head1 ACKNOWLEDGEMENTS
109 Stevan Little E<lt>stevan@iinteractive.comE<gt>
111 =head1 COPYRIGHT AND LICENSE
113 Copyright 2006 by Infinity Interactive, Inc.
115 L<http://www.iinteractive.com>
117 This library is free software; you can redistribute it and/or modify
118 it under the same terms as Perl itself.