2 # This file is part of App::CPAN2Pkg.
3 # Copyright (c) 2009 Jerome Quelin, all rights reserved.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the same terms as Perl itself.
10 package App
::CPAN2Pkg
::Curses
;
17 use base
qw{ Curses
::UI
::POE
};
20 # debugging with curses is not easy
21 if ( exists $ENV{CPAN2PKG_DEBUG
} ) {
22 $SIG{__DIE__
} = $SIG{__WARN__
} = sub {
23 open my $fh, '>>', 'stderr';
33 my ($class, $opts) = @_;
35 my $cui = $class->new(
40 _stop
=> sub { warn "_stop"; },
53 my ($k, $self) = @_[KERNEL
, HEAP
];
58 App
::CPAN2Pkg
->spawn($opts);
68 CPAN2Mdv - generating mandriva rpms from cpan
70 - Packages queue ------------------------------------------
71 Language::Befunge [ok]
79 ExtUtils::CBuilder [ok]
84 Class::XSAccessor [ok]
87 UNIVERSAL::require [ok]
89 enter = jump to, n = new, d = delete
102 $self->_build_main_window;
103 $self->_set_bindings;
108 my $tb = $self->add(undef, 'Window',
111 $self->{title
} = $tb->add(undef, 'Label', -bold
=>1);
114 sub _build_main_window
{
118 getmaxyx
($rows, $cols);
119 my $mw = $self->add('win_queue', 'Window',
122 -height
=> $rows - 2,
128 $self->set_binding( sub{ die; }, "\cQ" );