View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
 舌尖上的牛氓  > Mojo-Downloader-0.2 > A


Annotate this POD

View/Report Bugs


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.


    my $url = '';
    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 );

    # download 1 file

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

        # do some stuff here 


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.

syntax highlighting: