| 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
| |||||||||||
| 29 | 0 | croak 'Invalid attributes for class: ' . | |||||||||
| 30 | join ' ', @invalids | ||||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 0 | return; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 1 | 1; | |||||||||
| 37 | |||||||||||
| 38 | __END__ | ||||||||||