line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mason::PluginRole; |
2
|
|
|
|
|
|
|
$Mason::PluginRole::VERSION = '2.23'; |
3
|
20
|
|
|
20
|
|
107
|
use Moose::Role (); |
|
20
|
|
|
|
|
29
|
|
|
20
|
|
|
|
|
443
|
|
4
|
20
|
|
|
20
|
|
94
|
use Method::Signatures::Simple (); |
|
20
|
|
|
|
|
33
|
|
|
20
|
|
|
|
|
290
|
|
5
|
20
|
|
|
20
|
|
254
|
use Moose::Exporter; |
|
20
|
|
|
|
|
28
|
|
|
20
|
|
|
|
|
213
|
|
6
|
|
|
|
|
|
|
Moose::Exporter->setup_import_methods( also => ['Moose::Role'] ); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub init_meta { |
9
|
143
|
|
|
143
|
0
|
17195
|
my $class = shift; |
10
|
143
|
|
|
|
|
813
|
my %params = @_; |
11
|
143
|
|
|
|
|
686
|
my $for_class = $params{for_class}; |
12
|
143
|
|
|
|
|
1324
|
Method::Signatures::Simple->import( into => $for_class ); |
13
|
143
|
|
|
|
|
60635
|
Moose::Role->init_meta(@_); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
1; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__END__ |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=pod |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Mason::PluginRole - Helper for defining Mason plugin roles |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 SYNOPSIS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# instead of use Moose::Role; |
29
|
|
|
|
|
|
|
use Mason::PluginRole; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 DESCRIPTION |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
A variant on Moose::Role that can be used in Mason plugin roles. Using this |
34
|
|
|
|
|
|
|
module is equivalent to |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
use Moose::Role; |
37
|
|
|
|
|
|
|
use Method::Signatures::Simple; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SEE ALSO |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
L<Mason|Mason> |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHOR |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Jonathan Swartz <swartz@pobox.com> |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This software is copyright (c) 2012 by Jonathan Swartz. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
52
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |