| 1 | package Dancer::Template::Handlebars::Helpers; | ||||||||||||
| 2 | 3 | our $AUTHORITY = 'cpan:YANICK'; | |||||||||||
| 3 | # ABSTRACT: parent class for Handlebars' helper collections | ||||||||||||
| 4 | 3 | $Dancer::Template::Handlebars::Helpers::VERSION = '0.2.2'; | |||||||||||
| 5 | 3 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 3 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 3 | ▶ | use Sub::Attribute; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | 3 | my %HELPERS; | |||||||||||
| 11 | |||||||||||||
| 12 | 2 | ▶ | sub HANDLEBARS_HELPERS { | ||||||||||
|
Subroutine
HANDLEBARS_HELPERS: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||
| 13 | 2 | my $class = shift; | |||||||||||
| 14 | 2 | ▶ | %{ $HELPERS{$class} || {} }; | ||||||||||
|
Condition50%1/2
$HELPERS{$class} || {}
MC/DC0%0/1
$HELPERS{$class} || {}
$HELPERS{$class}
Truth table50%1/2
A
A= $HELPERS{$class}
| |||||||||||||
| 15 | } | ||||||||||||
| 16 | |||||||||||||
| 17 | 4 | ▶ | sub Helper :ATTR_SUB { | ||||||||||
|
Subroutine
Helper: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 18 | 4 | my( $class, $sym_ref, undef, undef, $attr_data ) = @_; | |||||||||||
| 19 | |||||||||||||
| 20 | 4 | my $fname = $class . '::' . *{ $sym_ref }{NAME}; | |||||||||||
| 21 | 4 | ▶ | my $helper_name = $attr_data || *{ $sym_ref }{NAME}; | ||||||||||
|
Condition100%2/2
$attr_data || *{$sym_ref;}{'NAME'}
MC/DC100%1/1
$attr_data || *{$sym_ref;}{'NAME'}
$attr_data
Truth table100%2/2
A
A= $attr_data
| |||||||||||||
| 22 | |||||||||||||
| 23 | 4 | $HELPERS{$class}{$helper_name} = \&$fname; | |||||||||||
| 24 | 3 | ▶ | } | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 25 | |||||||||||||
| 26 | 3 | 1; | |||||||||||
| 27 | |||||||||||||
| 28 | __END__ | ||||||||||||