CPANPLUS-Shell-Tk
view release on metacpan or search on metacpan
lib/CPANPLUS/Shell/Tk.pm view on Meta::CPAN
my $menu = $list->Menu(-tearoff => 0,
-menuitems => [
[Button => 'Install',
-command => sub {
$MW->Busy;
$self->{$_}->packForget foreach qw(HISTORY POD INFO);
$self->{INFO}->pack(-fill => 'both', -expand => 1);
$self->{INFO}->delete('0.0', 'end');
$CP->install(modules => $self->{MODS});
$self->{HISTORY}->insert('end', "install\t" . join(' ', @{$self->{MODS}}) . "\n");
$MW->Unbusy;
}],
[Button => 'Uninstall',
-command => sub {
$MW->Busy;
$self->{$_}->packForget foreach qw(HISTORY POD INFO);
$self->{INFO}->pack(-fill => 'both', -expand => 1);
$self->{INFO}->delete('0.0', 'end');
$CP->uninstall(modules => $self->{MODS});
$self->{HISTORY}->insert('end', "uninstall\t" . join(' ', @{$self->{MODS}}) . "\n");
$MW->Unbusy;
}],
[Button => 'Fetch',
-command => sub {
$MW->Busy;
$self->{$_}->packForget foreach qw(HISTORY POD INFO);
$self->{INFO}->pack(-fill => 'both', -expand => 1);
$self->{INFO}->delete('0.0', 'end');
$CP->fetch(modules => $self->{MODS});
$self->{HISTORY}->insert('end', "fetch\t" . join(' ', @{$self->{MODS}}) . "\n");
$MW->Unbusy;
}],
[Button => 'Extract',
-command => sub {
$MW->Busy;
$self->{$_}->packForget foreach qw(HISTORY POD INFO);
$self->{INFO}->pack(-fill => 'both', -expand => 1);
$self->{INFO}->delete('0.0', 'end');
$CP->extract(modules => $self->{MODS});
$self->{HISTORY}->insert('end', "extract\t" . join(' ', @{$self->{MODS}}) . "\n");
$MW->Unbusy;
}],
[Button => 'Make',
-command => sub {
$MW->Busy;
$self->{$_}->packForget foreach qw(HISTORY POD INFO);
$self->{INFO}->pack(-fill => 'both', -expand => 1);
$self->{INFO}->delete('0.0', 'end');
$CP->make(modules => $self->{MODS});
$self->{HISTORY}->insert('end', "make\t" . join(' ', @{$self->{MODS}}) . "\n");
$MW->Unbusy;
}],
[Button => 'Pod',
-command => sub {
$self->{$_}->packForget foreach qw(HISTORY POD INFO);
$self->{POD}->configure(-file => $self->{MODS}->[0]);
print $self->{MODS}->[0], "\n";
$self->{POD}->pack(-fill => 'both', -expand => 1);
}],
],
);
( run in 0.227 second using v1.01-cache-2.11-cpan-87723dcf8b7 )