| 1 | package PX::API::Response::Rest; | ||
| 2 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | use version; our $VERSION = qv('0.0.3'); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 0 | ▶ | use XML::Simple; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 9 | |||
| 10 | sub new { | ||
| 11 | my $class = shift; | ||
| 12 | my $args = shift || {}; | ||
| 13 | |||
| 14 | $class = ref($class) || $class; | ||
| 15 | my $self = bless {}, $class; | ||
| 16 | $self->{'xs'} = XML::Simple->new(KeepRoot => 1, KeyAttr => []); | ||
| 17 | return $self; | ||
| 18 | } | ||
| 19 | |||
| 20 | sub parse { | ||
| 21 | my $self = shift; | ||
| 22 | my $xml = shift; | ||
| 23 | |||
| 24 | my $xs = $self->{'xs'}; | ||
| 25 | my $ref = $xs->XMLin($xml); | ||
| 26 | return $ref; | ||
| 27 | } | ||
| 28 | |||
| 29 | sub format { 'rest' } | ||
| 30 | |||
| 31 | |||
| 32 | 1; | ||
| 33 | __END__ | ||