Permalink
Browse files

don't warn on answers that definitely are empty

  • Loading branch information...
1 parent 9aa68f6 commit e3e5c5770e5758e8ca4e96c08a92dcc927753205 @wchristian wchristian committed Dec 4, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Net/LastFMAPI.pm
View
@@ -317,9 +317,9 @@ sub extract_rows {
my $main_data = $content->{$main_keys[0]};
my @data_keys = sort keys %{$main_data};
unless (@main_keys == 1 && @data_keys == 2 && $data_keys[0] eq '@attr') {
- carp "extracting rows may be broken";
my ( $text, $total ) = ( $main_data->{'#text'}, $main_data->{total} );
return if defined $text && $text =~ /^\s+$/ && defined $total && $total == 0; # no rows
+ carp "extracting rows may be broken";
}
%last_response_meta = %{ $main_data->{$data_keys[0]} };
my $rows = $main_data->{$data_keys[1]};

0 comments on commit e3e5c57

Please sign in to comment.