Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor tweeks to the xml parser stuff

  • Loading branch information...
commit 7b405ec14015041c6fe8fcff2715bd1dfeebda2f 1 parent ba48d59
@sanko authored
Showing with 3 additions and 9 deletions.
  1. +3 −9 lib/AnyEvent/MSN.pm
View
12 lib/AnyEvent/MSN.pm
@@ -974,15 +974,9 @@ XML
state $xml_twig //= XML::Twig->new();
$xml_twig->parse(shift); # build it
my $xml;
- try {
- $xml = $xml_twig->simplify(keyattr => [qw[type id]],
- var_attr => ['value']);
- }
- catch {
- $s->trigger_error(qq[parsing XML: $_], 1);
- $xml = {};
- };
- $xml;
+ try { $xml = $xml_twig->simplify(keyattr => [qw[type id value]]) }
+ catch { $s->trigger_error(qq[parsing XML: $_], 1) };
+ $xml // {};
}
# Non-OOP utility functions
Please sign in to comment.
Something went wrong with that request. Please try again.