7e18bdc6e87b3a8b2ac2f049357f78645a4c93e8
[gitmo/Class-MOP.git] / lib / Class / MOP / Module.pm
1
2 package Class::MOP::Module;
3
4 use strict;
5 use warnings;
6
7 use Scalar::Util 'blessed';
8
9 our $VERSION   = '0.02';
10 #our $AUTHORITY = {
11 #    cpan   => 'STEVAN',
12 #    mailto => 'stevan@iinteractive.com',
13 #    http   => '//www.iinteractive.com/'
14 #};
15
16 use base 'Class::MOP::Package';
17
18 # introspection
19
20 sub meta { 
21     require Class::MOP::Class;
22     Class::MOP::Class->initialize(blessed($_[0]) || $_[0]);
23 }
24
25 # QUESTION:
26 # can the version be an attribute of the 
27 # module? I think it should be, but we need
28 # to somehow assure that it always is stored
29 # in the symbol table instead of being stored 
30 # into the instance structure itself
31
32 sub version {  
33     my $self = shift;
34     ${$self->get_package_symbol('$VERSION')};
35 }
36
37 #sub authority {  
38 #    my $self = shift;
39 #    $self->get_package_symbol('$AUTHORITY');
40 #}
41
42
43 1;
44
45 __END__
46
47 =pod
48
49 =head1 NAME 
50
51 Class::MOP::Module - Module Meta Object
52
53 =head1 SYNOPSIS
54
55 =head1 DESCRIPTION
56
57 =head1 METHODS
58
59 =over 4
60
61 =item B<meta>
62
63 =item B<version>
64
65 =back
66
67 =head1 AUTHORS
68
69 Stevan Little E<lt>stevan@iinteractive.comE<gt>
70
71 Yuval Kogman E<lt>nothingmuch@woobling.comE<gt>
72
73 =head1 COPYRIGHT AND LICENSE
74
75 Copyright 2006 by Infinity Interactive, Inc.
76
77 L<http://www.iinteractive.com>
78
79 This library is free software; you can redistribute it and/or modify
80 it under the same terms as Perl itself.
81
82 =cut