Skip to content

Commit

Permalink
Sub::Retry++
Browse files Browse the repository at this point in the history
  • Loading branch information
okamuuu committed Jan 13, 2011
1 parent 9a75a9b commit 7db1980
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/CI/Youtube/Entry.pm
@@ -1,6 +1,7 @@
package CI::Youtube::Entry;
use strict;
use warnings;
use Sub::Retry;
use Cache::FileCache;
use WebService::Simple;
use URI;
Expand Down Expand Up @@ -97,7 +98,8 @@ sub _get_data_from {
# response_parser => 'JSON',
);

my $response = eval { $ws->get };
# my $response = eval { $ws->get };
my $response = retry 3, 1, sub { $ws->get };

if ( $@ ) {
warn $@;
Expand Down

0 comments on commit 7db1980

Please sign in to comment.