summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorNicolas R <atoomic@cpan.org>2020-03-12 16:42:24 -0600
committerKarl Williamson <khw@cpan.org>2020-03-13 10:54:09 -0600
commitce957b554e06659e23c22d868e747b60f010883e (patch)
tree02beef4006c4c434a4379ccd4d36f6a07953b262 /utils
parent6b32f57da89de094200b8259611c0f2c80aeeef2 (diff)
downloadperl-ce957b554e06659e23c22d868e747b60f010883e.tar.gz
Add strict and warnings to a few utils
Diffstat (limited to 'utils')
-rw-r--r--utils/h2ph.PL7
-rw-r--r--utils/perlbug.PL7
-rw-r--r--utils/pl2pm.PL7
-rw-r--r--utils/splain.PL9
4 files changed, 21 insertions, 9 deletions
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index db787499eb..eece12ddc5 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -1,5 +1,8 @@
#!/usr/local/bin/perl
+use strict;
+use warnings;
+
use Config;
use File::Basename qw(basename dirname);
use Cwd;
@@ -14,9 +17,9 @@ use Cwd;
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
+my $origdir = cwd;
chdir dirname($0);
-$file = basename($0, '.PL');
+my $file = basename($0, '.PL');
$file .= '.com' if $^O eq 'VMS';
open OUT, '>', $file or die "Can't create $file: $!";
diff --git a/utils/perlbug.PL b/utils/perlbug.PL
index 3a55fa7c2b..8a46b20f14 100644
--- a/utils/perlbug.PL
+++ b/utils/perlbug.PL
@@ -1,5 +1,8 @@
#!/usr/local/bin/perl
+use strict;
+use warnings;
+
use Config;
use File::Basename qw(&basename &dirname);
use Cwd;
@@ -15,9 +18,9 @@ use File::Spec::Functions;
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
+my $origdir = cwd;
chdir dirname($0);
-$file = basename($0, '.PL');
+my $file = basename($0, '.PL');
$file .= '.com' if $^O eq 'VMS';
open OUT, ">", $file or die "Can't create $file: $!";
diff --git a/utils/pl2pm.PL b/utils/pl2pm.PL
index 19aef581ab..39a1fb9fec 100644
--- a/utils/pl2pm.PL
+++ b/utils/pl2pm.PL
@@ -1,5 +1,8 @@
#!/usr/local/bin/perl
+use strict;
+use warnings;
+
use Config;
use File::Basename qw(&basename &dirname);
use Cwd;
@@ -13,9 +16,9 @@ use Cwd;
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
+my $origdir = cwd;
chdir dirname($0);
-$file = basename($0, '.PL');
+my $file = basename($0, '.PL');
$file .= '.com' if $^O eq 'VMS';
open OUT, ">", $file or die "Can't create $file: $!";
diff --git a/utils/splain.PL b/utils/splain.PL
index ccf325de93..f01ed126ec 100644
--- a/utils/splain.PL
+++ b/utils/splain.PL
@@ -1,5 +1,8 @@
#!/usr/local/bin/perl
+use strict;
+use warnings;
+
use Config;
use File::Basename qw(&basename &dirname);
use File::Spec;
@@ -15,13 +18,13 @@ use Cwd;
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-$origdir = cwd;
+my $origdir = cwd;
chdir dirname($0);
-$file = basename($0, '.PL');
+my $file = basename($0, '.PL');
$file .= '.com' if $^O eq 'VMS';
# Open input file before creating output file.
-$in = File::Spec->catfile(File::Spec->updir, 'lib', 'diagnostics.pm');
+my $in = File::Spec->catfile(File::Spec->updir, 'lib', 'diagnostics.pm');
open IN, '<', $in or die "Can't open $in: $!\n";
# Create output file.