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 n = new, d = delete, enter = jump to
101 my $tb = $self->add('win_title', 'Window', -height
=>1);
102 $title = $tb->add('title', 'Label', -bold
=>1, -width
=>40);
103 $title->text("Building package from cpan");
105 $self->set_binding( sub { $title->text("foo")->draw; die; }, KEY_ENTER
);
113 { -label
=> 'Package new...', -callback
=> sub { warn; } },
114 { -label
=> 'Exit', -callback
=> sub { warn; } },
121 { -label => 'Packages queue', -callback => sub { warn; } },
122 { -label => 'Window list', -callback => sub { warn; } },
125 { -label => "Help", -callback => sub { warn; } },
126 { -label => "Help", -callback => sub { warn; } },
127 { -label => "Help", -callback => sub { warn; } },
128 { -label => "Help", -callback => sub { warn; } },
138 { -label
=> 'Module', -submenu
=> $mnu_module },
141 my $menu = $self->add(