Permalink
Browse files

Minor tweeks to the xml parser stuff

  • Loading branch information...
1 parent ba48d59 commit 7b405ec14015041c6fe8fcff2715bd1dfeebda2f @sanko committed Jun 16, 2011
Showing with 3 additions and 9 deletions.
  1. +3 −9 lib/AnyEvent/MSN.pm
View
@@ -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

0 comments on commit 7b405ec

Please sign in to comment.