| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Data::Plist::Foundation::NSObject; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
650
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
40
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
30
|
|
|
5
|
1
|
|
|
1
|
|
916
|
use Class::ISA; |
|
|
1
|
|
|
|
|
3377
|
|
|
|
1
|
|
|
|
|
13
|
|
|
6
|
1
|
|
|
1
|
|
827
|
use UNIVERSAL::isa; |
|
|
1
|
|
|
|
|
1062
|
|
|
|
1
|
|
|
|
|
7
|
|
|
7
|
1
|
|
|
1
|
|
27
|
use Scalar::Util qw//; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
391
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init { |
|
10
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
11
|
|
|
|
|
|
|
} |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub replacement { |
|
14
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
15
|
0
|
|
|
|
|
|
$self->init; |
|
16
|
0
|
|
|
|
|
|
return $self; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub serialize_class { |
|
20
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
21
|
0
|
0
|
|
|
|
|
$self = ref $self if ref $self; |
|
22
|
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
my $short = $self; |
|
24
|
0
|
|
|
|
|
|
$short =~ s/^Data::Plist::Foundation:://; |
|
25
|
|
|
|
|
|
|
return [ |
|
26
|
0
|
|
|
|
|
|
UID => [ |
|
27
|
|
|
|
|
|
|
dict => { |
|
28
|
|
|
|
|
|
|
'$classes' => [ |
|
29
|
|
|
|
|
|
|
array => [ |
|
30
|
0
|
|
|
|
|
|
map { s/^Data::Plist::Foundation:://; [ string => $_ ] } |
|
|
0
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
grep { $_->isa("Data::Plist::Foundation::NSObject") } |
|
32
|
|
|
|
|
|
|
Class::ISA::self_and_super_path($self) |
|
33
|
|
|
|
|
|
|
] |
|
34
|
|
|
|
|
|
|
], |
|
35
|
|
|
|
|
|
|
'$classname' => [ string => $short ], |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
] |
|
38
|
|
|
|
|
|
|
]; |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub serialize_equiv { |
|
42
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
43
|
0
|
|
|
|
|
|
return { %{$self} }; |
|
|
0
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub serialize { |
|
47
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
48
|
0
|
|
|
|
|
|
my %dict; |
|
49
|
0
|
|
|
|
|
|
$dict{'$class'} = $self->serialize_class; |
|
50
|
0
|
|
|
|
|
|
my $equiv = $self->serialize_equiv; |
|
51
|
0
|
|
|
|
|
|
for my $key ( keys %{$equiv} ) { |
|
|
0
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
my $value = Data::Plist::Writer->serialize_value( $equiv->{$key} ); |
|
53
|
0
|
0
|
|
|
|
|
if ( $value->[0] =~ /^(data|integer|real|true|false)$/ ) { |
|
54
|
0
|
|
|
|
|
|
$dict{$key} = $value; |
|
55
|
|
|
|
|
|
|
} else { |
|
56
|
0
|
|
|
|
|
|
$dict{$key} = [ UID => $value ]; |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
} |
|
59
|
0
|
|
|
|
|
|
return [ dict => \%dict ]; |
|
60
|
|
|
|
|
|
|
} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |