[Module-build-checkins] CPANPLUS-Dist-Build/t 02_CPANPLUS-Dist-Build.t,1.5,1.6
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <kwi...@us...> - 2005-08-08 03:04:15
|
Update of /cvsroot/module-build/CPANPLUS-Dist-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13419/t Modified Files: 02_CPANPLUS-Dist-Build.t Log Message: Get rid of a bunch of warnings. A couple types we just mask, because one is a fault of CPANPLUS itself, and another is a 'redefined' warning about some subroutines we're purposefully overriding. We also get rid of some 'undef' warnings that were caused by setting 'sudo' to undef - now we use the empty string. Would be better if instead we could set a "use sudo" option to false or something. Index: 02_CPANPLUS-Dist-Build.t =================================================================== RCS file: /cvsroot/module-build/CPANPLUS-Dist-Build/t/02_CPANPLUS-Dist-Build.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- 02_CPANPLUS-Dist-Build.t 8 Aug 2005 00:44:18 -0000 1.5 +++ 02_CPANPLUS-Dist-Build.t 8 Aug 2005 03:04:05 -0000 1.6 @@ -23,6 +23,8 @@ use Config; use IPC::Cmd 'can_run'; +$SIG{__WARN__} = sub {warn @_ unless @_ && $_[0] =~ /redefined|isn't numeric/}; + # Load these two modules in advance, even though they would be # auto-loaded, because we want to override some of their subs. use ExtUtils::Packlist; @@ -67,7 +69,7 @@ $Conf->set_conf( cpantest => 0 ); ### we dont need sudo -- we're installing in our own sandbox now - $Conf->set_program( sudo => undef ); + $Conf->set_program( sudo => '' ); } use_ok( $Class ); @@ -159,7 +161,6 @@ my $p = ExtUtils::Packlist->new($packlist); ok keys(%$p) > 0, "Packlist contains entries"; - local $^W = 0; # Avoid 'redefined' warnings local *CPANPLUS::Module::installed_version = sub {1}; local *CPANPLUS::Module::packlist = sub { [$p] }; local *ExtUtils::Installed::files = sub { keys %$p }; |