From 371deba642a366634ca4a1af68cdffa5ed70f76a Mon Sep 17 00:00:00 2001 From: Elvin Aslanov Date: Sun, 12 Nov 2023 12:04:53 +0100 Subject: [PATCH] `valgrindpp.pl`: Fix `new` indirect syntax In two places Also format POD in few places --- Porting/valgrindpp.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Porting/valgrindpp.pl b/Porting/valgrindpp.pl index 79285cbdad07..cd837f1ad7e4 100755 --- a/Porting/valgrindpp.pl +++ b/Porting/valgrindpp.pl @@ -1,4 +1,5 @@ #!/usr/bin/perl + use IO::File (); use File::Find qw(find); use Text::Wrap qw(wrap); @@ -49,7 +50,7 @@ # (do it early, as it may fail) my $fh = \*STDOUT; if (exists $opt{'output-file'}) { - $fh = new IO::File ">$opt{'output-file'}" + $fh = IO::File->new($opt{'output-file'}, 'w') or die "$0: cannot open $opt{'output-file'} ($!)\n"; } @@ -197,7 +198,7 @@ sub filter { # Get all the valgrind output lines my @l = do { - my $fh = new IO::File $_ or die "$0: cannot open $_ ($!)\n"; + my $fh = IO::File->new($_, 'r') or die "$0: cannot open $_ ($!)\n"; # Process outputs can interrupt each other, so sort by pid first my %pid; local $_; while (<$fh>) { @@ -269,7 +270,7 @@ sub debug { =head1 NAME -valgrindpp.pl - A post processor for make test.valgrind +valgrindpp.pl - A post processor for C =head1 SYNOPSIS @@ -281,7 +282,7 @@ =head1 SYNOPSIS =head1 DESCRIPTION B is a post processor for I<.valgrind> files -created during I. It collects all these +created during C. It collects all these files, extracts most of the information and produces a significantly shorter summary of all detected memory access errors and memory leaks.