Carmel

 view release on metacpan or  search on metacpan

lib/Carmel/App.pm  view on Meta::CPAN

    my($self, @args) = @_;

    my $snapshot = $self->snapshot
      or die "Can't run carmel update without snapshot. Run `carmel install` first.\n";

    print "---> Checking updates...\n";

    $self->update_or_install($snapshot, @args);
}

sub update_or_install {
    my($self, $snapshot, @args) = @_;

    my $builder = $self->builder;
    my $requirements = $self->requirements;

    my $check = sub {
        my($module, $pathname, $in_args, $version) = @_;

        return if $module eq 'perl';

lib/Carmel/App.pm  view on Meta::CPAN


    my $snapshot = $self->snapshot;
    if ($snapshot) {
        $self->update_dependencies($self->requirements, $snapshot);
    } else {
        print "---> Installing modules...\n";
        $self->update_or_install($snapshot);
    }
}

sub update_dependencies {
    my($self, $root_reqs, $snapshot) = @_;

    my @artifacts = $self->install($root_reqs, $snapshot);
    $self->dump_bootstrap(\@artifacts);
    $self->save_snapshot(\@artifacts);
}

sub resolve_dependencies {
    my($self, $root_reqs, $missing, $snapshot) = @_;

lib/Carmel/ProgressBar.pm  view on Meta::CPAN

    $self->update(0);

    for my $i (0..$#$args) {
        $code->($args->[$i]);
        $self->update($i+1);
    }

    $self->clear;
}

sub update {
    my($self, $count) = @_;

    return if $self->quiet;

    my $width  = $self->width;
    my $pct    = int(100 * $count / $self->total);
    my $done   = ceil($pct * $width / 100);
    my $head   = $width == $done ? 0 : 1;
    my $remain = ($width - $done - $head);



( run in 0.447 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )