CanvasCloud

 view release on metacpan or  search on metacpan

lib/CanvasCloud/API/Account/Report.pm  view on Meta::CPAN

        while ( $attempts > 0 ) {
           $resp = $self->ua->get( $result->{attachment}{url} ); ## Download report without using class specific headers
           if ( $resp->is_success ) {
               $attempts = 0;
           } else {
               sleep 20; ## sleep 20 seconds and try again
               $attempts--;
           }
        }
        die $resp->status_line unless ( $resp->is_success );
        return $resp->decoded_content( charset => 'none' );
    }
    warn sprintf('Report->get ASSERT: id(%s) returned last status (%s)', $result->{id}, $result->{status} );
    return undef; ## never should but nothing would be retured
}

__PACKAGE__->meta->make_immutable;

1;

__END__



( run in 2.690 seconds using v1.01-cache-2.11-cpan-a9ef4e587e4 )