line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mason::PluginRole; |
2
|
|
|
|
|
|
|
$Mason::PluginRole::VERSION = '2.24'; |
3
|
20
|
|
|
20
|
|
94
|
use Moose::Role (); |
|
20
|
|
|
|
|
47
|
|
|
20
|
|
|
|
|
413
|
|
4
|
20
|
|
|
20
|
|
87
|
use Method::Signatures::Simple (); |
|
20
|
|
|
|
|
27
|
|
|
20
|
|
|
|
|
279
|
|
5
|
20
|
|
|
20
|
|
70
|
use Moose::Exporter; |
|
20
|
|
|
|
|
205
|
|
|
20
|
|
|
|
|
221
|
|
6
|
|
|
|
|
|
|
Moose::Exporter->setup_import_methods( also => ['Moose::Role'] ); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub init_meta { |
9
|
143
|
|
|
143
|
0
|
16706
|
my $class = shift; |
10
|
143
|
|
|
|
|
757
|
my %params = @_; |
11
|
143
|
|
|
|
|
493
|
my $for_class = $params{for_class}; |
12
|
143
|
|
|
|
|
1564
|
Method::Signatures::Simple->import( into => $for_class ); |
13
|
143
|
|
|
|
|
56472
|
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 |