hesco has asked for the wisdom of the Perl Monks concerning the following question:
Date: Fri, 6 Jun 2008 17:20:12 +0100 Subject: FAIL Test-MonitorSites-0.13 darwin-2level 7.9.0 From: "JJ" <jj@jonallen.info> To: cpan-testers@perl.org Cc: HESCO@cpan.org X-Reported-Via: Test::Reporter 1.4001, via CPAN::Reporter 1.15 <snip> ------------------------------ PROGRAM OUTPUT ------------------------------ Output from '/Users/jj/perl/perl-5.8.1/bin/perl Makefile.PL': Can't locate File/Util.pm in @INC (@INC contains: /Users/jj/perl/perl- +5.8.1/lib/5.8.1/darwin-2level /Users/jj/perl/perl-5.8.1/lib/5.8.1 /Us +ers/jj/perl/pe rl-5.8.1/lib/site_perl/5.8.1/darwin-2level /Users/jj/perl/perl-5.8.1/l +ib/site_perl/5.8.1 /Users/jj/perl/perl-5.8.1/lib/site_perl .) at Make +file.PL line 4 . BEGIN failed--compilation aborted at Makefile.PL line 4. ------------------------------ PREREQUISITES ------------------------------ Prerequisite modules loaded: No requirements found
use strict; use warnings; use ExtUtils::MakeMaker; use File::Util; print "==> These tests generate email output + <==\n"; print "==> Where would you like your test results sent? + <==\n"; print "==> By default test email summaries go to dev-null\@example.co +m <==\n"; print "==> By default test sms summaries go to dev-null\@example.com + <==\n"; my $email = prompt('Send test email summaries to?','devnull@example.co +m'); my $sms = prompt('Send test sms summaries to?','devnull@example.com'); my($f) = File::Util->new(); my @config_files = $f->list_dir( 't/ini' , '--pattern=\.ini$' ); foreach my $config_file (@config_files){ print "writing t/$config_file \n"; open ('INI','>',"t/$config_file"); open ('SRC',"t/ini/$config_file"); while(<SRC>){ if(m/^sms_recipients =/){ $_ =~ s/$_/sms_recipients = '$sms'\n/; } if(m/^results_recipients =/){ $_ =~ s/$_/results_recipients = '$em +ail'\n/; } print INI $_; } close SRC; close INI; } WriteMakefile( NAME => 'Test::MonitorSites', AUTHOR => 'Hugh Esco <hesco@greens.org>', VERSION_FROM => 'lib/Test/MonitorSites.pm', ABSTRACT_FROM => 'lib/Test/MonitorSites.pm', PL_FILES => {}, PREREQ_PM => { 'Cwd' => 0, 'Carp' => 0, 'File::Util' => 0, 'Data::Dumper' => 0, 'Test::More' => 0, 'Test::Pod' => 1.14, 'Test::Pod::Coverage' => 1.04, 'Test::Builder' => 0, 'Mail::Mailer' => 0, 'Config::Simple' => 0, 'WWW::Mechanize' => 0, 'Test::WWW::Mechanize' => 0, 'Test::HTML::Tidy' => 0, 'HTTP::Request::Common' => 0, 'Test::Builder::Tester' => 0, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', } +, clean => { FILES => 'Test-MonitorSites-* t/*.ini' }, );
Does the cpan prompt have some way of uninstalling a module so I could test this on my local sandbox, without having to just guess at things and hope that this change does what I intend without breaking something else?
UPDATE:
My File::Util dependency is limited to this single invocation in Makefile.PL,
which rewrites some configuration files so that the tests send sample output to the installers email and sms addresses. I'm about to commit version 0.15 of this module using Syphillis' idea. But I'm guessing its time to reach for TIMTOWTDI for this simple task.my($f) = File::Util->new(); my @config_files = $f->list_dir( 't/ini' , '--pattern=\.ini$' ); foreach my $config_file (@config_files){
-- Hugh
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SmokeTesters Complain of Missing Dependencies Which a Module's Makefile.PL Requires
by syphilis (Archbishop) on Jun 06, 2008 at 23:10 UTC | |
|
Re: SmokeTesters Complain of Missing Dependencies Which a Module's Makefile.PL Requires
by bingos (Vicar) on Jun 07, 2008 at 07:50 UTC | |
|
Re: SmokeTesters Complain of Missing Dependencies Which a Module's Makefile.PL Requires
by Khen1950fx (Canon) on Jun 06, 2008 at 17:53 UTC |