| 1 | package Data::Serializer::XML::Simple; | ||||||||||
| 2 | 12 | ▶ | BEGIN { @Data::Serializer::XML::Simple::ISA = qw(Data::Serializer) } | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 12 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 12 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 12 | ▶ | use XML::Simple qw(); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 12 | ▶ | use vars qw($VERSION @ISA); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 12 | $VERSION = '0.03'; | |||||||||
| 10 | |||||||||||
| 11 | |||||||||||
| 12 | 132 | ▶ | sub serialize { | ||||||||
|
Subroutine
serialize: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 13 | 132 | my $self = (shift); | |||||||||
| 14 | 132 | ▶ | my %options = ref $self->{options} eq 'HASH' ? %{$self->{options}}: (); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 132 | my $xml = XML::Simple->new(keyattr => [ 'name'], %options); | |||||||||
| 16 | 132 | return $xml->XMLout( (shift) ); | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 132 | ▶ | sub deserialize { | ||||||||
|
Subroutine
deserialize: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 20 | 132 | my $self = (shift); | |||||||||
| 21 | 132 | ▶ | my %options = ref $self->{options} eq 'HASH' ? %{$self->{options}}: (); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 132 | my $xml = XML::Simple->new(keyattr => [ 'name'], %options); | |||||||||
| 23 | 132 | return $xml->XMLin( (shift) ); | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 12 | 1; | |||||||||
| 27 | __END__ | ||||||||||