line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mason::DynamicFilter; |
2
|
|
|
|
|
|
|
$Mason::DynamicFilter::VERSION = '2.23'; |
3
|
19
|
|
|
19
|
|
93
|
use Mason::Moose; |
|
19
|
|
|
|
|
31
|
|
|
19
|
|
|
|
|
146
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
has 'filter' => ( isa => 'CodeRef' ); |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
around 'BUILDARGS' => sub { |
8
|
|
|
|
|
|
|
my $orig = shift; |
9
|
|
|
|
|
|
|
my $class = shift; |
10
|
|
|
|
|
|
|
if ( @_ == 1 ) { |
11
|
|
|
|
|
|
|
return $class->$orig( filter => $_[0] ); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
else { |
14
|
|
|
|
|
|
|
return $class->$orig(@_); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
19
|
|
|
19
|
|
42185
|
method apply_filter () { |
|
9
|
|
|
9
|
|
18
|
|
|
9
|
|
|
|
|
11
|
|
19
|
9
|
|
|
|
|
12
|
my ($yield) = @_; |
20
|
9
|
|
|
|
|
302
|
return $self->filter->($yield); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |