Re: [Module::Build] PL_Files and add_to_cleanup
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <ml...@th...> - 2006-02-25 03:40:52
|
John Peacock wrote:
> I was noticing that if I create some files using a .PL script that I
> listed in the PL_FILES hash, that these files are not automatically
> deleted when running './Build distclean' (or realclean or clean).
> Shouldn't they be automatically added to the add_to_cleanup files? I
> cannot think of a use case where these files shouldn't be deleted (since
> they are always overwritten by Build).
>
> I can produce a patch if that would be acceptable.
I peeked at the code; it looks like it should work correctly:
sub process_PL_files {
my ($self) = @_;
my $files = $self->find_PL_files;
while (my ($file, $to) = each %$files) {
unless ($self->up_to_date( $file, $to )) {
$self->run_perl_script($file, [], [@$to]);
$self->add_to_cleanup(@$to);
}
}
}
Under what conditions does it fail to clean up?
Thanks,
Randy.
|