Fix perlcritic complaints
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 6 Dec 2015 21:58:18 +0000 (23:58 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 6 Dec 2015 21:58:18 +0000 (23:58 +0200)
lib/WWW/Offliberty.pm

index 1163d9ee21f1ddc3fb2808bd403031d63c9cc717..f14c0d8f1d18916e9a24b1eafcad7547153e185a 100644 (file)
@@ -12,12 +12,12 @@ use constant OFF_URL => 'http://offliberty.com/off02.php';
 use HTML::TreeBuilder;
 use HTTP::Tiny;
 
-our $http = HTTP::Tiny->new(agent => "WWW-Offliberty/$VERSION ", default_headers => {Referer => "http://offliberty.com/"});
+our $http = HTTP::Tiny->new(agent => "WWW-Offliberty/$VERSION ", default_headers => {Referer => 'http://offliberty.com/'});
 
 sub off{
        my ($url, @params) = @_;
        my $ret = $http->post_form(OFF_URL, {track => $url, @params});
-       die $ret->{reason} unless $ret->{success};
+       die $ret->{reason} unless $ret->{success}; ## no critic (RequireCarping)
        my $root = HTML::TreeBuilder->new_from_content($ret->{content});
        map { $_->attr('href') } $root->look_down(qw/_tag a class download/);
 }
This page took 0.010482 seconds and 4 git commands to generate.