From: Tomas Doran Date: Wed, 27 Jan 2010 00:05:19 +0000 (+0000) Subject: Makebe fix FAR.. Remove warning suppresssion X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Devel.git;a=commitdiff_plain;h=ee2184e2f37034507fae23efa2ad1afc75c76fed Makebe fix FAR.. Remove warning suppresssion --- diff --git a/Makefile.PL b/Makefile.PL index 6f49885..0b4cdbe 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -24,6 +24,9 @@ requires 'Template' => '2.14'; author_requires 'IPC::Run3'; +author_requires 'PAR::Packer'; +author_requires 'Module::ScanDeps'; + test_requires 'Test::More' => '0.94'; install_share 'share'; diff --git a/lib/Module/Install/Catalyst.pm b/lib/Module/Install/Catalyst.pm index ccfdf01..fad07e1 100644 --- a/lib/Module/Install/Catalyst.pm +++ b/lib/Module/Install/Catalyst.pm @@ -221,13 +221,13 @@ sub _catalyst_par { my $engine = $ENGINE || 'CGI'; # Check for PAR - eval "use PAR ()"; + eval { require PAR }; die "Please install PAR\n" if $@; - eval "use PAR::Packer ()"; + eval { require PAR::Packer }; die "Please install PAR::Packer\n" if $@; - eval "use App::Packer::PAR ()"; + eval { require App::Packer::PAR }; die "Please install App::Packer::PAR\n" if $@; - eval "use Module::ScanDeps ()"; + eval { require Module::ScanDeps }; die "Please install Module::ScanDeps\n" if $@; my $root = $FindBin::Bin; @@ -308,15 +308,20 @@ else { require Getopt::Long; require Pod::Usage; require Pod::Text; + require Catalyst::ScriptRole; + require Catalyst::Script::Server; + require Catalyst::Script::FastCGI + require Catalyst::Script::Test; + require Catalyst::Script::Create; $classes } EOF $tmp_file->close; # Create package - local $SIG{__WARN__} = sub { }; - open my $olderr, '>&STDERR'; - open STDERR, '>', File::Spec->devnull; + #local $SIG{__WARN__} = sub { }; + #open my $olderr, '>&STDERR'; + #open STDERR, '>', File::Spec->devnull; my %opt = ( 'x' => 1, 'n' => 0, @@ -334,7 +339,7 @@ EOF args => ['par.pl'], )->go; - open STDERR, '>&', $olderr; + #open STDERR, '>&', $olderr; unlink $par_pl; chdir $root; diff --git a/t/generated_app.t b/t/generated_app.t index 51cb3f1..799f270 100644 --- a/t/generated_app.t +++ b/t/generated_app.t @@ -80,7 +80,12 @@ create_ok($_, 'My' . $_) for qw/Model View Controller/; command_ok( [ $^X, 'Makefile.PL' ] ); ok -e "Makefile", "Makefile generated"; #NOTE: do not assume that 'make' is always 'make' as e.g. Win32/strawberry perl uses 'dmake' -command_ok( [ ($Config{make} || 'make') ] ); +my $make = $Config{make} || 'make'; +command_ok( [ $make ], 'Ran make ok' ); +if (eval { require PAR::Packer }) { + command_ok([ $make, 'catalyst_par' ], 'Ran make catalyst_par ok'); + command_ok([ 'parl', ]); # FIXME - Win32? +} run_generated_component_tests();