X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FAction%2FSuppressions.pm;h=6c34860b4c907628d4fd4b4a92d9b07635fb2aa5;hb=39af0cb1411f565d286cd656a7a0bdd3d3ba07fb;hp=3fe2d22a185c59e7aee9a02687f201428a63330c;hpb=cc42998614d386a86ed90c9c9dd3ce9df68140f5;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind/Action/Suppressions.pm b/lib/Test/Valgrind/Action/Suppressions.pm index 3fe2d22..6c34860 100644 --- a/lib/Test/Valgrind/Action/Suppressions.pm +++ b/lib/Test/Valgrind/Action/Suppressions.pm @@ -9,11 +9,11 @@ Test::Valgrind::Action::Suppressions - Generate suppressions for a given tool. =head1 VERSION -Version 1.14 +Version 1.15 =cut -our $VERSION = '1.14'; +our $VERSION = '1.15'; =head1 DESCRIPTION @@ -145,17 +145,18 @@ sub finish { require File::Spec; my ($vol, $dir, $file) = File::Spec->splitpath($target); my $base = File::Spec->catpath($vol, $dir, ''); - unless (-e $base) { + if (-e $base) { + 1 while unlink $target; + } else { require File::Path; File::Path::mkpath([ $base ]); - } else { - 1 while unlink $target; } open my $fh, '>', $target or $self->_croak("open(\$fh, '>', \$self->target): $!"); - my (%seen, $id); + my $id = 0; + my %seen; for (sort { $a->data cmp $b->data } grep !$seen{$_->data}++, @{$self->{supps}}) { print $fh "{\n" @@ -198,7 +199,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009,2010,2011,2013 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011,2013,2015 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.