Vimana

 view release on metacpan or  search on metacpan

lib/Vimana/Installer.pm  view on Meta::CPAN

sub download {
    my ( $self, $url, $target ) = @_;
    use HTTP::Lite;
    my $savetofile = sub {
        my ( $self, $dataref, $cbargs ) = @_;
        print STDERR ".";
        print $cbargs $$dataref;
        return undef;
    };
    my $http = new HTTP::Lite;
    $http->proxy( $ENV{HTTP_PROXY} ) if $ENV{HTTP_PROXY};
    open my $dl, ">", $target or die $!;
    my $res = $http->request( $url, $savetofile, $dl );
    close $dl;
    print "\n";
}

sub get_installer {
    my $self = shift;
    my $type = shift;
    my $class = qq{Vimana::Installer::} . ucfirst($type);



( run in 0.844 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )