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 | 92 | use Moo; | |||
13 | 34 | ||||||
13 | 89 | ||||||
4 | 13 | 13 | 4677 | use namespace::clean; | |||
13 | 36 | ||||||
13 | 81 | ||||||
5 | |||||||
6 | our $VERSION = '1.0.0'; | ||||||
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 | 23602 | my ($class, @args) = @_; | ||
17 | 55 | 50 | 193 | if (@args % 2 == 1) { unshift @args, "code" } | |||
55 | 139 | ||||||
18 | 55 | 957 | return { @args }; | ||||
19 | } | ||||||
20 | 1; | ||||||
21 | |||||||
22 | __END__ |