CPANPLUS-Shell-Tk
view release on metacpan or search on metacpan
lib/CPANPLUS/Shell/Tk.pm view on Meta::CPAN
}
#------------------------------------------------------------------------
# _setup_contents creates the contents of the main window by calling several methods
#
sub _setup_contents {
my $self = shift;
my $MW = $self->{MW};
my $CP = $self->{CP};
$self->_setup_cpanplus_callbacks;
my ($topframe, $leftframe, $rightframe) = $self->_setup_frames;
$self->_setup_perl_info($topframe);
$self->_setup_left_frame($leftframe);
$self->_setup_right_frame($rightframe);
}
#------------------------------------------------------------------------
# _setup_cpanplus_callbacks installs callbacks in the Backend to recieve
# print and error messages and put them into the right frame
#
sub _setup_cpanplus_callbacks {
my $self = shift;
my $MW = $self->{MW};
my $CP = $self->{CP};
my $eo = $CP->error_object;
$eo->set('ECALLBACK' => sub { $self->{INFO}->insert('end', "ERROR: $_[0]\n"); $self->{INFO}->see('end'); $MW->update });
$eo->set('ICALLBACK' => sub { $self->{INFO}->insert('end', "$_[0]\n"); $self->{INFO}->see('end'); $MW->update });
}
#------------------------------------------------------------------------
( run in 0.814 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )