line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::vCard::Precisely::V3::Node::MultiContent; |
2
|
|
|
|
|
|
|
|
3
|
28
|
|
|
28
|
|
208
|
use Carp; |
|
28
|
|
|
|
|
69
|
|
|
28
|
|
|
|
|
1936
|
|
4
|
28
|
|
|
28
|
|
188
|
use Moose; |
|
28
|
|
|
|
|
71
|
|
|
28
|
|
|
|
|
222
|
|
5
|
28
|
|
|
28
|
|
181210
|
use Moose::Util::TypeConstraints; |
|
28
|
|
|
|
|
72
|
|
|
28
|
|
|
|
|
261
|
|
6
|
|
|
|
|
|
|
|
7
|
28
|
|
|
28
|
|
58130
|
use overload( '""' => \&as_string ); |
|
28
|
|
|
|
|
66
|
|
|
28
|
|
|
|
|
314
|
|
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
|
186
|
my ($self) = @_; |
19
|
80
|
|
33
|
|
|
2581
|
my $string = ( $self->name() || croak "Empty name" ) . ':' . join ',', @{ $self->content() }; |
|
80
|
|
|
|
|
2488
|
|
20
|
80
|
|
|
|
|
253
|
return $self->fold($string); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
24
|
28
|
|
|
28
|
|
7059
|
no Moose; |
|
28
|
|
|
|
|
76
|
|
|
28
|
|
|
|
|
168
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |