Subject: | Bug found |
Date: | Tue, 5 Feb 2019 21:14:34 -0400 |
To: | bug-Roku-ECP [...] rt.cpan.org |
From: | Andrew Pritchard <stormthirst [...] gmail.com> |
My Rokus has added a 'subtype' to the output from 'apps'. This can be
fixed by adding XML::Simple to the dependent modules, and then
changing the apps subroutine:
sub apps
{
my $self = shift;
my @retval = ();
my $result = $self->_rest_request("GET", "/query/apps");
if (!$result->{'status'})
{
warn "Error: query/apps got status $result->{error}: $result->{message}";
return undef;
}
my $text = $result->{'data'};
my $xs = XML::Simple->new();
my $ref = $xs->XMLin($text, ForceArray => 1, KeyAttr => 'app');
$self->{'apps'} = [$ref]; # Cache a copy
return $ref;
}