From: Mark Wielaard Date: Fri, 21 Apr 2023 16:13:14 +0000 (+0200) Subject: Add use strict and use warnings to perl callgrind scripts X-Git-Tag: VALGRIND_3_21_0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fc239ed47b44b82fb14849159f5b22132b6ca94;p=thirdparty%2Fvalgrind.git Add use strict and use warnings to perl callgrind scripts This way we can simply use #! /usr/bin/env perl and don't need env -S and perl -w flags which might confuse some packaging utilities. --- diff --git a/callgrind/callgrind_annotate.in b/callgrind/callgrind_annotate.in index c0715e0649..976fe9b5fb 100644 --- a/callgrind/callgrind_annotate.in +++ b/callgrind/callgrind_annotate.in @@ -1,4 +1,4 @@ -#! /usr/bin/env -S perl -w +#! /usr/bin/env perl ##--------------------------------------------------------------------## ##--- The cache simulation framework: instrumentation, recording ---## ##--- and results printing. ---## @@ -59,6 +59,7 @@ # commifying (halves the number of commify calls) 1.68s --> 1.47s use strict; +use warnings; #---------------------------------------------------------------------------- # Overview: the running example in the comments is for: diff --git a/callgrind/callgrind_control.in b/callgrind/callgrind_control.in index b8969373e4..083ffa29fc 100644 --- a/callgrind/callgrind_control.in +++ b/callgrind/callgrind_control.in @@ -1,4 +1,4 @@ -#! /usr/bin/env -S perl -w +#! /usr/bin/env perl ##--------------------------------------------------------------------## ##--- Control supervision of applications run with callgrind ---## ##--- callgrind_control ---## @@ -21,6 +21,10 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, see . + +use strict; +use warnings; + use File::Basename; # vgdb_exe will be set to a vgdb found 'near' the callgrind_control file