Hi,

t/perlcritic.t fails with recent versions of Perl::Critic. See the
detailed log at http://bugs.debian.org/490325

I've prepared a tentative minimal patch that seems to fix the two
issues (s. attachment); please consider looking into this issue.

Cheers,
gregor, Debian Perl Group
-- 
 .''`.   http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
 : :' :  debian gnu/linux user, admin & developer - http://www.debian.org/
 `. `'   member of https://www.vibe.at/ | how to reply: http://got.to/quote/
   `-    NP: Queen: Friends Will Be Friends
--- libwww-facebook-api-perl-0.4.11.orig/lib/WWW/Facebook/API.pm
+++ libwww-facebook-api-perl-0.4.11/lib/WWW/Facebook/API.pm
@@ -367,16 +367,15 @@
     return 0   if $response =~ /\A"?false"?\Z/xms;
 
     my $parser;
-    eval { $parser = _parser() };
+    eval { $parser = _parser(); 1; } or do {
 
     # Only load JSON::Any if we haven't already.  Lets the developers
     # pick their choice of JSON modules (JSON::DWIW, for example)
-    if ($@) {    ## no critic
         ## no critic
         eval q{use JSON::Any};
         croak "Unable to load JSON module for parsing:[EMAIL PROTECTED]" if $@;
         $parser = _parser();
-    }
+    };
     carp 'JSON::Any is parsing with ' . $parser->handlerType if $self->debug;
 
     return $parser->decode($response);
--- libwww-facebook-api-perl-0.4.11.orig/lib/WWW/Facebook/API/Auth.pm
+++ libwww-facebook-api-perl-0.4.11/lib/WWW/Facebook/API/Auth.pm
@@ -12,6 +12,9 @@
 
 use version; our $VERSION = qv('0.4.11');
 
+use Readonly;
+Readonly my $DEFAULT_SLEEP => 15;
+
 sub create_token {
     my $self = shift;
     my $token;
@@ -87,7 +90,7 @@
     system qq($browser "$url");
 
     # Give the user time to log in
-    $args{'sleep'} ||= 15;
+    $args{'sleep'} ||= $DEFAULT_SLEEP;
     sleep $args{'sleep'};
 
     return $token;

Attachment: signature.asc
Description: Digital signature

Reply via email to