blib/lib/URI/urn/oid.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 15 | 15 | 100.0 |
branch | 3 | 4 | 75.0 |
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 22 | 24 | 91.6 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package URI::urn::oid; # RFC 2061 | ||||||
2 | |||||||
3 | 1 | 1 | 7 | use strict; | |||
1 | 2 | ||||||
1 | 29 | ||||||
4 | 1 | 1 | 5 | use warnings; | |||
1 | 2 | ||||||
1 | 37 | ||||||
5 | |||||||
6 | our $VERSION = '5.21'; | ||||||
7 | |||||||
8 | 1 | 1 | 5 | use parent 'URI::urn'; | |||
1 | 2 | ||||||
1 | 4 | ||||||
9 | |||||||
10 | sub oid { | ||||||
11 | 3 | 3 | 0 | 475 | my $self = shift; | ||
12 | 3 | 7 | my $old = $self->nss; | ||||
13 | 3 | 100 | 6 | if (@_) { | |||
14 | 1 | 8 | $self->nss(join(".", @_)); | ||||
15 | } | ||||||
16 | 3 | 50 | 7 | return split(/\./, $old) if wantarray; | |||
17 | 3 | 12 | return $old; | ||||
18 | } | ||||||
19 | |||||||
20 | 1; |