blib/lib/MARC/Spec/Subfield.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 10 | 10 | 100.0 |
branch | 1 | 2 | 50.0 |
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 14 | 16 | 87.5 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package MARC::Spec::Subfield; | ||||||
2 | |||||||
3 | 13 | 13 | 50 | use Moo; | |||
13 | 14 | ||||||
13 | 61 | ||||||
4 | 13 | 13 | 2470 | use namespace::clean; | |||
13 | 16 | ||||||
13 | 54 | ||||||
5 | |||||||
6 | our $VERSION = '0.1.4'; | ||||||
7 | |||||||
8 | extends 'MARC::Spec::Structure'; | ||||||
9 | |||||||
10 | has code => ( | ||||||
11 | is => 'rw', | ||||||
12 | required => 1 | ||||||
13 | ); | ||||||
14 | |||||||
15 | sub BUILDARGS { | ||||||
16 | 55 | 55 | 0 | 13058 | my ($class, @args) = @_; | ||
17 | 55 | 50 | 117 | if (@args % 2 == 1) { unshift @args, "code" } | |||
55 | 73 | ||||||
18 | 55 | 768 | return { @args }; | ||||
19 | } | ||||||
20 | 1; | ||||||
21 | |||||||
22 | __END__ |