update prereqs + move on after upstream install
[app-cpan2pkg.git] / bin / cpan2pkg
blobe5d372489501b7f9a0d24b81302aff5367af82b0
1 #!/usr/bin/perl
3 # This file is part of App::CPAN2Pkg.
4 # Copyright (c) 2009 Jerome Quelin, all rights reserved.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the same terms as Perl itself.
11 use strict;
12 use warnings;
14 # for testing purposes
15 use FindBin qw{ $Bin };
16 use lib "$Bin/../lib";
18 #use Getopt::Euclid;
19 use App::CPAN2Pkg::Curses;
20 use Hook::Output::File;
22 my $hook;
23 my $dir = _get_development_root();
24 if ( defined $dir ) {
25 $hook = Hook::Output::File->redirect(
26 stdout => "$dir/cpan2pkg.stdout",
27 stderr => "$dir/cpan2pkg.stderr",
29 warn '-' x 40 . "\n";
32 my $ui = App::CPAN2Pkg::Curses->spawn({modules=>\@ARGV});
33 $ui->mainloop;
35 exit;
37 sub _get_development_root {
38 my $dir = "$Bin/..";
39 return $dir if -d "$dir/.git";
40 return;
43 __END__