File Coverage

blib/lib/Stenciller/Utils.pm
Criterion Covered Total %
statement 87 97 89.6
branch 9 30 30.0
condition n/a
subroutine 10 11 90.9
pod n/a
total 106 138 76.8


line stmt bran cond sub pod time code
1 9     9   17019 use Stenciller::Standard;
  9         55  
  9         42880  
2              
3             our $VERSION = '0.1212'; # VERSION:
4             # PODNAME: Stenciller::Utils
5              
6 5     5   25573 role Stenciller::Utils using Moose {
  5     5   120  
  5     1   31  
  5         8  
  5         327  
  5         23  
  5         8  
  5         78  
  5         1371  
  5         8  
  5         34  
  5         283  
  5         9  
  5         258  
  5         28  
  5         9  
  5         416  
  5         135  
  5         23  
  5         9  
  5         46  
  5         17805  
  5         10  
  5         47  
  5         22303  
  5         11  
  5         42  
  5         42295  
  5         9  
  5         51  
  5         376  
  5         8  
  5         73  
  5         1025  
  5         10  
  5         35  
  5         4839  
  5         7  
  5         47  
  5         18577  
  5         14  
  5         197  
  5         20  
  5         7  
  5         160  
  5         19  
  5         8  
  5         234  
  5         18  
  5         11  
  5         651  
  5         38  
  1         3509  
7              
8 5 50   5   78280 method eval_to_hashref(Str $possible_hash!, Path|Str $faulty_file! --> HashRef) {
  5 50   5   10  
  5 50   5   697  
  5 50   8   24  
  5 50       5  
  5 50       588  
  5 50       24  
  5 50       10  
  5         648  
  1         12  
  8         214  
  8         30  
  8         22  
  8         18  
  8         5  
  8         22  
  8         15  
  8         34  
  8         6  
  8         41  
  8         7  
9 8         518 my $settings = eval $possible_hash;
10 8 50       38 die sprintf "Can't parse stencil start: <%s> in %s: %s", $possible_hash, $faulty_file, $@ if $@;
11 8         128 return $settings;
12             }
13 5 0   5   9165 method eval(Str $string!) {
  5 0   5   12  
  5 0   0   742  
  5 0       26  
  5 0       6  
  5         544  
  1         10836  
  0            
  0            
  0            
  0            
  0            
  0            
  0            
14 0           eval $string;
15 0 0         die sprintf "Can't parse %s: %s", $string, $@ if $@;
16 0           return 1;
17             }
18             }
19              
20             1;
21              
22             __END__
23              
24             =pod
25              
26             =encoding UTF-8
27              
28             =head1 NAME
29              
30             Stenciller::Utils
31              
32             =head1 VERSION
33              
34             Version 0.1212, released 2015-02-10.
35              
36             =head1 SOURCE
37              
38             L<https://github.com/Csson/p5-Stenciller>
39              
40             =head1 HOMEPAGE
41              
42             L<https://metacpan.org/release/Stenciller>
43              
44             =head1 AUTHOR
45              
46             Erik Carlsson <info@code301.com>
47              
48             =head1 COPYRIGHT AND LICENSE
49              
50             This software is copyright (c) 2015 by Erik Carlsson <info@code301.com>.
51              
52             This is free software; you can redistribute it and/or modify it under
53             the same terms as the Perl 5 programming language system itself.
54              
55             =cut