| 1 | package Dancer2::Template::Handlebars::Helpers 1.00; | ||||||||||||
| 2 | |||||||||||||
| 3 | # ABSTRACT: parent class for Handlebars' helper collections | ||||||||||||
| 4 | |||||||||||||
| 5 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 2 | ▶ | use Sub::Attribute; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | 2 | my %HELPERS; | |||||||||||
| 11 | |||||||||||||
| 12 | 1 | ▶ | sub HANDLEBARS_HELPERS { | ||||||||||
|
Subroutine
HANDLEBARS_HELPERS: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||
| 13 | 1 | my $class = shift; | |||||||||||
| 14 | 1 | ▶ | %{ $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 | 2 | ▶ | sub Helper : ATTR_SUB { | ||||||||||
|
Subroutine
Helper: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 18 | 2 | my ( $class, $sym_ref, undef, undef, $attr_data ) = @_; | |||||||||||
| 19 | |||||||||||||
| 20 | 2 | my $fname = $class . '::' . *{$sym_ref}{NAME}; | |||||||||||
| 21 | 2 | ▶ | 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 | 2 | $HELPERS{$class}{$helper_name} = \&$fname; | |||||||||||
| 24 | 2 | ▶ | } | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 25 | |||||||||||||
| 26 | 2 | 1; | |||||||||||
| 27 | |||||||||||||
| 28 | __END__ | ||||||||||||