line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Facebook::InstantArticle::Author; |
2
|
2
|
|
|
2
|
|
11
|
use Moose; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
13
|
|
3
|
2
|
|
|
2
|
|
13537
|
use namespace::autoclean; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
19
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
extends 'Facebook::InstantArticle::BaseElement'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has 'name' => ( |
8
|
|
|
|
|
|
|
isa => 'Str', |
9
|
|
|
|
|
|
|
is => 'rw', |
10
|
|
|
|
|
|
|
required => 1, |
11
|
|
|
|
|
|
|
default => '', |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has 'is_valid' => ( |
15
|
|
|
|
|
|
|
isa => 'Bool', |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
lazy => 1, |
18
|
|
|
|
|
|
|
default => sub { |
19
|
|
|
|
|
|
|
my $self = shift; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
return length $self->name ? 1 : 0; |
22
|
|
|
|
|
|
|
}, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has 'as_xml_gen' => ( |
26
|
|
|
|
|
|
|
isa => 'Object', |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
lazy => 1, |
29
|
|
|
|
|
|
|
builder => '_build_as_xml_gen', |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _build_as_xml_gen { |
33
|
1
|
|
|
1
|
|
3
|
my $self = shift; |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
8
|
my $gen = XML::Generator->new( ':pretty' ); |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
188
|
return $gen->address( |
38
|
|
|
|
|
|
|
$gen->a( $self->name ), |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |