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();
45 $meta->alias_method('confess' => \&confess);
46 $meta->alias_method('blessed' => \&blessed);
64 has '$.x' => (reader => 'x');
65 has '$.y' => (accessor => 'y');
80 after 'clear' => sub {
89 Makes Other Object Systems Envious
91 Most Other Objects Suck Eggs
93 Makes Object Orientation So Easy
95 Metacircular Object Oriented Systems Environment
99 All complex software has bugs lurking in it, and this module is no
100 exception. If you find a bug please either email me, or add the bug
105 I use L<Devel::Cover> to test the code coverage of my tests, below is the
106 L<Devel::Cover> report on this module's test suite.
108 =head1 ACKNOWLEDGEMENTS
112 Stevan Little E<lt>stevan@iinteractive.comE<gt>
114 =head1 COPYRIGHT AND LICENSE
116 Copyright 2006 by Infinity Interactive, Inc.
118 L<http://www.iinteractive.com>
120 This library is free software; you can redistribute it and/or modify
121 it under the same terms as Perl itself.