lib/Template/Mustache/Trait.pm

filter: Statementstmt 100% 21 / 21 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 96.7% 30 / 31 CC 3 SCAR 4.1
CC
3
Cov
96%
__ANON__
2.0
__ANON__
2.0
BEGIN
1.0
CRAP 1.5
« script/mustache.pl ↑ Summary
1 package Template::Mustache::Trait;
2 1 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: turn an attribute into a Mustache template
4 1 $Template::Mustache::Trait::VERSION = '1.4.0';
5  
6 1 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Template::Mustache;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶before _process_options => sub {
Subroutine __ANON__: called CC=2 SCAR=7.0
12 2 my( $class, $name, $options ) = @_;
13  
14 2 ▶ my $default = $options->{default} or return;
Branch: 1 branch
BranchTrueFalseTotal
my $default = $options->{"default"} or return 2 0 2
15  
16 2 ▶ $options->{default} = sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
17 2 my $self = shift;
18 2 ▶ Template::Mustache->new(
Branch: 1 branch
BranchTrueFalseTotal
ref $default ? : 1 1 2
19 template => ref $default ? $default->($self) : $default,
20 context => $self
21 );
22 2 };
23 1 };
24  
25 package Moose::Meta::Attribute::Custom::Trait::Mustache;
26 1 our $AUTHORITY = 'cpan:YANICK';
27 1 $Moose::Meta::Attribute::Custom::Trait::Mustache::VERSION = '1.4.0';
28 1 ▶sub register_implementation { 'Template::Mustache::Trait' }
Subroutine register_implementation: called CC=1 SCAR=0.0
29  
30 1 1;
31  
32 __END__
« script/mustache.pl ↑ Summary