line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::ClassAttribute::Meta::Role::Attribute; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
24
|
use strict; |
|
8
|
|
|
|
|
8
|
|
|
8
|
|
|
|
|
179
|
|
4
|
8
|
|
|
8
|
|
21
|
use warnings; |
|
8
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
238
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.29'; |
7
|
|
|
|
|
|
|
|
8
|
8
|
|
|
8
|
|
27
|
use namespace::autoclean; |
|
8
|
|
|
|
|
6
|
|
|
8
|
|
|
|
|
41
|
|
9
|
8
|
|
|
8
|
|
382
|
use Moose; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
41
|
|
10
|
8
|
|
|
8
|
|
36391
|
use List::Util 1.45 'uniq'; |
|
8
|
|
|
|
|
200
|
|
|
8
|
|
|
|
|
1206
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends 'Moose::Meta::Role::Attribute'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
32
|
|
|
32
|
1
|
1679
|
my ( $class, $name, %options ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$options{traits} = [ |
18
|
32
|
100
|
|
|
|
34
|
uniq( @{ $options{traits} || [] } ), |
|
32
|
|
|
|
|
162
|
|
19
|
|
|
|
|
|
|
'MooseX::ClassAttribute::Trait::Attribute' |
20
|
|
|
|
|
|
|
]; |
21
|
|
|
|
|
|
|
|
22
|
32
|
|
|
|
|
125
|
return $class->SUPER::new( $name, %options ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# ABSTRACT: An attribute metaclass for class attributes in roles |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=pod |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=encoding UTF-8 |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 NAME |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
MooseX::ClassAttribute::Meta::Role::Attribute - An attribute metaclass for class attributes in roles |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 VERSION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
version 0.29 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 DESCRIPTION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This class overrides L<Moose::Meta::Role::Attribute> to support class |
46
|
|
|
|
|
|
|
attribute declaration in roles. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 BUGS |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
See L<MooseX::ClassAttribute> for details. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Bugs may be submitted through L<the RT bug tracker|http://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-ClassAttribute> |
53
|
|
|
|
|
|
|
(or L<bug-moosex-classattribute@rt.cpan.org|mailto:bug-moosex-classattribute@rt.cpan.org>). |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
I am also usually active on IRC as 'drolsky' on C<irc://irc.perl.org>. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This software is Copyright (c) 2016 by Dave Rolsky. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This is free software, licensed under: |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |