On Fri, Jul 04, 2008 at 10:02:24PM -0400, James E Keenan wrote:
> David Cantrell wrote:
> >On Tue, Jun 17, 2008 at 09:40:02PM -0400, David Golden wrote:
> >
> >>There also seem to be some things in ~/tmp/
> >>That's on linux.  It's worse on Win32.  Lots of stuff winds up dumped
> >>in c:\.  In one case, I think there were several thousand tiny
> >>directories.
> >
> >On *nix I periodically clean out several hundred files from /tmp.
> >I assume that they're created by File::Temp.
> >
> 
> In the course of my testing of Parrot's configuration and build tools, I 
> have had *many* occasions to create temporary files and directories.  At 
> one point last year I got complaints.  We found that code like this did 
> the trick:
> 
> use File::Temp qw( tempdir tempfile );
> my $tdir = tempdir( CLEANUP => 1 );
> my ( $tmpfile, $fname ) = tempfile( UNLINK => 1 );
> 
> Since these are functions from a core module, there is no excuse for any 
> CPAN author not to use them with these cleanup options.  (I'd say that 
> proper cleanup of temp files created during testing should be a 
> 'kwalitee' metric -- but I don't want to get into that argument!)

Funny you should mention that. I've been slowly working through the
rewrite of YACSmoke. One of the aspects that I've been thinking about is
having CPAN Testers run the often disputed "pod.t" and "podcover.t" type
tests.

I haven't had a chance to think how it could be done, but there must be
some way to easily inject tests, that are marked in someway so that the
author knows that they where they appeared from, that can automatically
add this kind of testing. This would allow authors to not include them
with their distribution, and CPANTS draw information from the test
reports.

However, the major problem I can see with that is if a distribution is
well respected, but fails these tests. I can see a huge backlash. The
best alternative I had was for there to be two sets of reports, the
first as per the author package, then a second with the extra tests,
which is sent to a different server for informational purposes only.
This would then feed into some kwalitee metric of CPANTS.

We could then build on this to check for leaving behind temp files,
writing to directories they shouldn't and all manner of other things.

Not practical in the current setups, but something to consider for the
future.

Cheers,
Barbie.
-- 
Birmingham Perl Mongers <http://birmingham.pm.org>
Memoirs Of A Roadie <http://barbie.missbarbell.co.uk>


Reply via email to