NAME

A simple async-download tool written by mojo and anyevent.Maybe u can download file by Mojo::UserAgent,but sometimes if you feel lazy ,you can try this module.

SYNOPSIS

my $url = 'http://dldir1.qq.com/qqfile/QQforMac/QQ_V3.0.2.dmg';
my $d   = Mojo::Downloader->new;
$d->set_max_currency(5); # set this,every time download will be limited 5 files

for ( 1 .. 50) {
    my $file = "/tmp/macqq_" . $_ . ".dmg";
    $d->download( $url, $file );
}
$d->cv->recv;

# download 1 file
$d->download($url,$file)->recv;

# customize your own downloader
$d->on( download => sub {
    my ($ua,$tx,$file,$options) = @_;

    # do some stuff here 
    },`
);

AUTHOR

Copyright (C) <2014>, <niumang>.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

# niumang // vim: ts=4 sw=4 expandtab # TODO - Edit.