Min/Note.pm

filter: Statementstmt 76.1% 16 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 68.9% 20 / 29 CC 2 SCAR 9.8
CC
2
Cov
70%
BUILD
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« Min/TermEntry.pm ↑ Summary Min.pm »
1 #
2 # This file is part of TBX-Min
3 #
4 # This software is copyright (c) 2016 by Alan Melby.
5 #
6 # This is free software; you can redistribute it and/or modify it under
7 # the same terms as the Perl 5 programming language system itself.
8 #
9 package TBX::Min::Note;
10 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Class::Tiny qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
13 noteValue
14 noteKey
15 1 );
16 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 1 our $VERSION = '0.08'; # VERSION
19  
20 # ABSTRACT: Store information from one TBX-Min C<tig> element
21  
22 # above Pod::Coverage makes this not "naked" via Pod::Coverage::TrustPod
23  
24 1 my %valid = map {+($_=>1)} Class::Tiny->get_all_attributes_for(__PACKAGE__);
25 0 ▶sub BUILD {
Subroutine BUILD: not called CC=2 SCAR=17.9
Pod undocumented
26 0 my ($self, $args) = @_;
27  
28 0 ▶ if(my @invalids = grep {!$valid{$_}} sort keys %$args){
Branch: 1 branch
BranchTrueFalseTotal
if (my(@invalids) = grep({not $valid{$_};} sort(keys %$args))) 0 0 0
29 0 croak 'Invalid attributes for class: ' .
30 join ' ', @invalids
31 }
32  
33 0 return;
34 }
35  
36 1 1;
37  
38 __END__
« Min/TermEntry.pm ↑ Summary Min.pm »