Commit | Line | Data |
4dee0fd3 |
1 | package MooseX::ClassAttribute; |
2 | |
3 | use warnings; |
4 | use strict; |
5 | |
6 | our $VERSION = '0.01'; |
0f24a39d |
7 | our $AUTHORITY = 'cpan:DROLSKY'; |
8 | |
9 | use Moose; |
10 | use MooseX::ClassAttribute::Meta::Method::Accessor; |
11 | |
12 | extends 'Moose::Meta::Attribute'; |
13 | |
14 | sub accessor_metaclass { 'MooseX::ClassAttribute::Meta::Method::Accessor' } |
15 | |
16 | # This is called when an object is constructed. |
17 | sub initialize_instance_slot |
18 | { |
19 | return; |
20 | } |
21 | |
22 | |
23 | # This is the bit of magic that lets you specify the metaclass as |
24 | # 'ClassAttribute', rather than the full name, when creating an |
25 | # attribute. |
26 | package Moose::Meta::Attribute::Custom::ClassAttribute; |
27 | |
28 | sub register_implementation { 'MooseX::ClassAttribute' } |
4dee0fd3 |
29 | |
30 | |
31 | 1; |
32 | |
33 | __END__ |
34 | |
35 | =pod |
36 | |
37 | =head1 NAME |
38 | |
39 | MooseX::ClassAttribute - The fantastic new MooseX::ClassAttribute! |
40 | |
4dee0fd3 |
41 | =head1 SYNOPSIS |
42 | |
43 | Quick summary of what the module does. |
44 | |
45 | Perhaps a little code snippet. |
46 | |
47 | use MooseX::ClassAttribute; |
48 | |
0f24a39d |
49 | my $foo = MooseX::ClassAttribute->new(); |
4dee0fd3 |
50 | |
51 | ... |
52 | |
53 | =head1 METHODS |
54 | |
55 | This class provides the following methods |
56 | |
57 | =head1 AUTHOR |
58 | |
59 | Dave Rolsky, C<< <autarch@urth.org> >> |
60 | |
61 | =head1 BUGS |
62 | |
63 | Please report any bugs or feature requests to C<bug-moosex-classattribute@rt.cpan.org>, |
64 | or through the web interface at L<http://rt.cpan.org>. I will be |
65 | notified, and then you'll automatically be notified of progress on |
66 | your bug as I make changes. |
67 | |
68 | =head1 COPYRIGHT & LICENSE |
69 | |
70 | Copyright 2007 Dave Rolsky, All Rights Reserved. |
71 | |
72 | This program is free software; you can redistribute it and/or modify |
73 | it under the same terms as Perl itself. |
74 | |
75 | =cut |