2 package Class::MOP::Module;
7 use Scalar::Util 'blessed';
10 our $AUTHORITY = 'cpan:STEVAN';
12 use base 'Class::MOP::Package';
17 require Class::MOP::Class;
18 Class::MOP::Class->initialize(blessed($_[0]) || $_[0]);
23 ${$self->get_package_symbol('$VERSION')};
28 ${$self->get_package_symbol('$AUTHORITY')};
35 ($self->version || ()),
36 ($self->authority || ()),
48 Class::MOP::Module - Module Meta Object
52 This is an abstraction of a Perl 5 module, it is a superclass of
53 L<Class::MOP::Class>. A module essentially a package with metadata,
54 in our case the version and authority.
62 Returns a metaclass for this package.
64 =item B<initialize ($package_name)>
66 This will initialize a Class::MOP::Module instance which represents
67 the module of C<$package_name>.
71 This is a read-only attribute which returns the C<$VERSION> of the
72 package for the given instance.
76 This is a read-only attribute which returns the C<$AUTHORITY> of the
77 package for the given instance.
81 This constructs a string of the name, version and authority.
87 Stevan Little E<lt>stevan@iinteractive.comE<gt>
89 =head1 COPYRIGHT AND LICENSE
91 Copyright 2006-2008 by Infinity Interactive, Inc.
93 L<http://www.iinteractive.com>
95 This library is free software; you can redistribute it and/or modify
96 it under the same terms as Perl itself.