line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mason::DynamicFilter; |
2
|
|
|
|
|
|
|
$Mason::DynamicFilter::VERSION = '2.24'; |
3
|
19
|
|
|
19
|
|
96
|
use Mason::Moose; |
|
19
|
|
|
|
|
29
|
|
|
19
|
|
|
|
|
152
|
|
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
|
|
39738
|
method apply_filter () { |
|
9
|
|
|
9
|
|
11
|
|
|
9
|
|
|
|
|
12
|
|
19
|
9
|
|
|
|
|
12
|
my ($yield) = @_; |
20
|
9
|
|
|
|
|
242
|
return $self->filter->($yield); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |