line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::Role::Pluggable::Plugin; |
2
|
|
|
|
|
|
|
$MooseX::Role::Pluggable::Plugin::VERSION = '0.07'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Role for plugins to consume |
4
|
2
|
|
|
2
|
|
1037523
|
use Moose::Role; |
|
2
|
|
|
|
|
9919
|
|
|
2
|
|
|
|
|
8
|
|
5
|
2
|
|
|
2
|
|
10865
|
use Moose::Util::TypeConstraints; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has _mxrp_name => ( |
8
|
|
|
|
|
|
|
isa => 'Str' , |
9
|
|
|
|
|
|
|
is => 'ro' , |
10
|
|
|
|
|
|
|
required => 1 , |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
subtype 'MooseXRolePluggable' |
14
|
|
|
|
|
|
|
=> as 'Object' |
15
|
|
|
|
|
|
|
=> where { $_->does( 'MooseX::Role::Pluggable' ) } |
16
|
|
|
|
|
|
|
=> message { 'Parent does not consume MooseX::Role::Pluggable!' }; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has _mxrp_parent => ( |
19
|
|
|
|
|
|
|
isa => 'MooseXRolePluggable' , |
20
|
|
|
|
|
|
|
is => 'ro' , |
21
|
|
|
|
|
|
|
required => 1 , |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
2
|
|
4605
|
no Moose::Role; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
10
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=pod |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding UTF-8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
MooseX::Role::Pluggable::Plugin - Role for plugins to consume |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 VERSION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
version 0.07 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
package MyMoose::Plugin::Antlers; |
44
|
|
|
|
|
|
|
use Moose; |
45
|
|
|
|
|
|
|
with 'MooseX::Role::Pluggable::Plugin'; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub gore { |
48
|
|
|
|
|
|
|
my( $self ) = shift; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# yadda yadda yadda |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# see the documentation for MooseX::Role::Pluggable for info on how to get |
54
|
|
|
|
|
|
|
# your Moose class to use this plugin... |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 DESCRIPTION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This is a role that must be consumed by any plugin that's going to be used |
59
|
|
|
|
|
|
|
with the 'MooseX::Role::Pluggable' role. It serves to make sure that required |
60
|
|
|
|
|
|
|
attributes are in place and contain the expected sorts of info. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Classes that want to utilize plugins should consume the |
63
|
|
|
|
|
|
|
'MooseX::Role::Pluggable' role; see the documentation for that module for more |
64
|
|
|
|
|
|
|
information. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 NAME |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
MooseX::Role::Pluggable::Plugin - add plugins to your Moose classes |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
John SJ Anderson, C<genehack@genehack.org> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 SEE ALSO |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<MooseX::Role::Pluggable> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Copyright 2014, John SJ Anderson |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
83
|
|
|
|
|
|
|
under the same terms as Perl itself. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 AUTHOR |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
John SJ Anderson <john@genehack.org> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This software is copyright (c) 2020 by John SJ Anderson. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
94
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |