CPANPLUS-Shell-Tk
view release on metacpan or search on metacpan
lib/CPANPLUS/Shell/Tk.pm view on Meta::CPAN
=item Workwindow
The window on the right shows different things depending on what you are doing
at the moment.
It shows basic information on the module when you select one in the list to the
left.
It shows the POD for the module when you select this from the right-click
popup menu in the list.
It shows the command history with editing facility when selected from the menu.
And it show this POD when you select 'Help' from the Help menu.
=back
=head1 USAGE
=head2 Searching
lib/CPANPLUS/Shell/Tk.pm view on Meta::CPAN
Select which type of search you want to do in the dropdown listbox.
Your search is always case sensitive but you can use perl regexen
as search value.
=head2 Working with Modules
When you click on the modules in the listbox on the left you get basic
information on the selected module.
When you right click on the module you get a popup menu which lets you do
the following:
=over 2
=item Install
Install the newest version of this module from CPAN.
=item Uninstall
lib/CPANPLUS/Shell/Tk.pm view on Meta::CPAN
$self->{INFO}->delete('0.0', 'end');
return if @mods > 1;
my $rv = $CP->details(modules => [$mods[0]]);
foreach (sort keys %{$rv->{rv}->{$mods[0]}}) {
$self->{INFO}->insert('end', "\n$_:\n\t" . $rv->{rv}->{$mods[0]}->{$_});
}
}
]
);
#---- on right click show popup menu
my $button3_menu = $self->_create_button3_menu($update);
$update->bindRows('<ButtonPress-3>',
[ sub {
my @sel = $update->curselection;
@{$self->{MODS}} = map {$update->columnGet(0)->get($_, $_)} @sel;
$button3_menu->Popup(-popover => 'cursor', -popanchor => 'nw');
},
]
);
lib/CPANPLUS/Shell/Tk.pm view on Meta::CPAN
$self->{INFO}->delete('0.0', 'end');
return if @mods > 1;
my $rv = $CP->details(modules => [$mods[0]]);
foreach (sort keys %{$rv->{rv}->{$mods[0]}}) {
$self->{INFO}->insert('end', "\n$_:\n\t" . $rv->{rv}->{$mods[0]}->{$_});
}
}
]
);
#---- on right click show popup menu
my $button3_menu = $self->_create_button3_menu($installed);
$installed->bindRows('<ButtonPress-3>',
[ sub {
my @sel = $installed->curselection;
@{$self->{MODS}} = map {$installed->columnGet(0)->get($_, $_)} @sel;
$button3_menu->Popup(-popover => 'cursor', -popanchor => 'nw');
},
]
);
lib/CPANPLUS/Shell/Tk.pm view on Meta::CPAN
]
);
$search->pack(-side => 'bottom', -fill => 'both', -expand => 1);
}
#------------------------------------------------------------------------
# right frame contains three text widgets, two are always hidden
# 1. history editor
# 2. module info
# 3. module pod
# the actual contents depends on the last action in popup or history menu
#
sub _setup_right_frame {
my $self = shift;
my $rightframe = shift;
#---- setting history widget
my $hist = $rightframe->Scrolled('Text',
-scrollbars => 'osow',
-background => 'white',
-wrap => 'none',
lib/CPANPLUS/Shell/Tk.pm view on Meta::CPAN
-font => '{Helvetica} -12 {normal}',
);
$info->Subwidget("yscrollbar")->configure(-width => 6);
$info->Subwidget("xscrollbar")->configure(-width => 6);
$info->pack(-fill => 'both', -expand => 1);
$self->{INFO} = $info;
}
#------------------------------------------------------------------------
# popup menu for button 3 in listbox
#
sub _create_button3_menu {
my ($self, $list) = @_;
my $MW = $self->{MW};
my $CP = $self->{CP};
my $menu = $list->Menu(-tearoff => 0,
-menuitems => [
[Button => 'Install',
( run in 2.524 seconds using v1.01-cache-2.11-cpan-364913b4093 )