line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Serializer::Data::Denter; |
2
|
11
|
|
|
11
|
|
640
|
BEGIN { @Data::Serializer::Data::Denter::ISA = qw(Data::Serializer) } |
3
|
|
|
|
|
|
|
|
4
|
11
|
|
|
11
|
|
83
|
use warnings; |
|
11
|
|
|
|
|
27
|
|
|
11
|
|
|
|
|
442
|
|
5
|
11
|
|
|
11
|
|
68
|
use strict; |
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
361
|
|
6
|
|
|
|
|
|
|
|
7
|
11
|
|
|
11
|
|
65
|
use Carp; |
|
11
|
|
|
|
|
24
|
|
|
11
|
|
|
|
|
829
|
|
8
|
11
|
|
|
11
|
|
81
|
use Data::Denter; |
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
766
|
|
9
|
|
|
|
|
|
|
|
10
|
11
|
|
|
11
|
|
85
|
use vars qw($VERSION @ISA); |
|
11
|
|
|
|
|
28
|
|
|
11
|
|
|
|
|
2242
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
$VERSION = '0.02'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# |
16
|
|
|
|
|
|
|
# Create a Data::Denter serializer object. |
17
|
|
|
|
|
|
|
# |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub serialize { |
20
|
231
|
|
|
231
|
1
|
471
|
my $self = shift; |
21
|
231
|
|
|
|
|
495
|
my ($val) = @_; |
22
|
231
|
50
|
|
|
|
676
|
return undef unless defined $val; |
23
|
231
|
100
|
|
|
|
745
|
return $val unless ref($val); |
24
|
189
|
|
|
|
|
665
|
return Data::Denter::Indent($val); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub deserialize { |
29
|
231
|
|
|
231
|
1
|
600
|
my $self = shift; |
30
|
231
|
|
|
|
|
672
|
my ($val) = @_; |
31
|
231
|
50
|
|
|
|
637
|
return undef unless defined $val; |
32
|
231
|
|
|
|
|
930
|
return Data::Denter::Undent($val); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Data::Serializer::Data::Denter - Creates bridge between Data::Serializer and Data::Denter |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 SYNOPSIS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
use Data::Serializer::Data::Denter; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 DESCRIPTION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Module is used internally to Data::Serializer |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=over 4 |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item B<serialize> - Wrapper to normalize serializer method name |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item B<deserialize> - Wrapper to normalize deserializer method name |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=back |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 AUTHOR |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Neil Neely <neil@neely.cx> |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 COPYRIGHT |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Copyright 2002 by Neil Neely. All rights reserved. |
68
|
|
|
|
|
|
|
This program is free software; you can redistribute it |
69
|
|
|
|
|
|
|
and/or modify it under the same terms as Perl itself. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 SEE ALSO |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
perl(1), Data::Serializer(3), Data::Denter(3). |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|