Crypt-PBC

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

    return 1 if -f "pbc-$ver.tar.gz" or $ENV{SKIP_DOWNLOAD};

    warn "downloading libpbc from http://voltar.org/pbcfiles/pbc-$ver.tar.gz...\n";

    my $worked = 0;
    eval {
        eval "require LWP::UserAgent"; die $@ if $@;
        my $ua = LWP::UserAgent->new;
           $ua->agent("crypt-pbc-fetcher/1.0");

        my $req = HTTP::Request->new(GET => "http://voltar.org/pbcfiles/pbc-$ver.tar.gz");
        my $res = $ua->request($req, "pbc-$ver.tar.gz");

        $worked = 1 if $res->is_success;
    };
    warn "LWP fetch problem: $@\n" if $@;

    unless( $worked ) {
        if( 0 != system(wget => '-O', "pbc-$ver.tar.gz", "http://voltar.org/pbcfiles/pbc-$ver.tar.gz") ) {
            warn "couldn't fetch with wget...\n";
            if( 0 != system(curl => '-o', "pbc-$ver.tar.gz", "http://voltar.org/pbcfiles/pbc-$ver.tar.gz") ) {



( run in 0.404 second using v1.01-cache-2.11-cpan-de7293f3b23 )