line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::vCard::Precisely::V3::Node::MultiContent; |
2
|
|
|
|
|
|
|
|
3
|
28
|
|
|
28
|
|
192
|
use Carp; |
|
28
|
|
|
|
|
62
|
|
|
28
|
|
|
|
|
1944
|
|
4
|
28
|
|
|
28
|
|
171
|
use Moose; |
|
28
|
|
|
|
|
58
|
|
|
28
|
|
|
|
|
206
|
|
5
|
28
|
|
|
28
|
|
177029
|
use Moose::Util::TypeConstraints; |
|
28
|
|
|
|
|
68
|
|
|
28
|
|
|
|
|
223
|
|
6
|
|
|
|
|
|
|
|
7
|
28
|
|
|
28
|
|
57460
|
use overload( '""' => \&as_string ); |
|
28
|
|
|
|
|
69
|
|
|
28
|
|
|
|
|
298
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends 'Text::vCard::Precisely::V3::Node'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has name => ( is => 'ro', default => 'ADR', isa => 'Str' ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
subtype 'MultiContent' => as 'ArrayRef[Str]'; |
14
|
|
|
|
|
|
|
coerce 'MultiContent' => from 'Str' => via { [$_] }; |
15
|
|
|
|
|
|
|
has content => ( is => 'rw', required => 1, isa => 'MultiContent', coerce => 1 ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub as_string { |
18
|
80
|
|
|
80
|
0
|
195
|
my ($self) = @_; |
19
|
80
|
|
33
|
|
|
2653
|
my $string = ( $self->name() || croak "Empty name" ) . ':' . join ',', @{ $self->content() }; |
|
80
|
|
|
|
|
2549
|
|
20
|
80
|
|
|
|
|
259
|
return $self->fold($string); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
24
|
28
|
|
|
28
|
|
6617
|
no Moose; |
|
28
|
|
|
|
|
67
|
|
|
28
|
|
|
|
|
172
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |