From 043ae7481cd3d05b453e0830b34573b7eef2aade Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Wed, 11 Mar 2020 15:40:01 -0600 Subject: Add strict and warnings to some .PL files use a convoluted incantation to be able to set 'use strict; use warnings' only for Perl > 5.6 --- dist/Module-CoreList/Makefile.PL | 4 ++++ dist/XSLoader/Makefile.PL | 18 +++++++++++++----- ext/DynaLoader/DynaLoader_pm.PL | 7 ++++++- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/dist/Module-CoreList/Makefile.PL b/dist/Module-CoreList/Makefile.PL index 6abce52101..7eb5ab287b 100644 --- a/dist/Module-CoreList/Makefile.PL +++ b/dist/Module-CoreList/Makefile.PL @@ -1,5 +1,9 @@ use ExtUtils::MakeMaker; +use strict; +use warnings; + +my @extra; push @extra, 'INSTALLDIRS' => 'perl' if $] >= 5.008009 and $] < 5.012; push @extra, 'META_MERGE' => { diff --git a/dist/XSLoader/Makefile.PL b/dist/XSLoader/Makefile.PL index 69b52340bd..c7cdbec770 100644 --- a/dist/XSLoader/Makefile.PL +++ b/dist/XSLoader/Makefile.PL @@ -5,16 +5,24 @@ # - Fill in your dependencies in PREREQ_PM # Alternatively, you can say the hell with this and use h2xs. +use strict; +use warnings; + use ExtUtils::MakeMaker; use ExtUtils::MM_Unix; + eval 'use ExtUtils::MakeMaker::Coverage'; -$PACKAGE = 'XSLoader'; -($PACKAGE_FILE = $PACKAGE) =~ s|::|/|g; -$LAST_API_CHANGE = 0; +my $PACKAGE = 'XSLoader'; +(my $PACKAGE_FILE = $PACKAGE) =~ s|::|/|g; +my $LAST_API_CHANGE = 0; -$CURRENT_VERSION = ${$PACKAGE.'::VERSION'}; -$NEW_VERSION = ExtUtils::MM_Unix->parse_version("XSLoader_pm.PL"); +my $CURRENT_VERSION; +{ + no strict 'refs'; + $CURRENT_VERSION = ${$PACKAGE.'::VERSION'}; +} +my $NEW_VERSION = ExtUtils::MM_Unix->parse_version("XSLoader_pm.PL"); eval "require $PACKAGE"; diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL index b964c71cd3..5c14cccc8d 100644 --- a/ext/DynaLoader/DynaLoader_pm.PL +++ b/ext/DynaLoader/DynaLoader_pm.PL @@ -1,5 +1,8 @@ use Config; +use strict; +use warnings; + sub to_string { my ($value) = @_; $value =~ s/\\/\\\\/g; @@ -85,7 +88,7 @@ package DynaLoader; # Tim.Bunce@ig.co.uk, August 1994 BEGIN { - $VERSION = '1.46'; + $VERSION = '1.47'; } EOT @@ -127,6 +130,8 @@ else { EOT } +my @dl_library_path; + print OUT expand_os_specific(<<'EOT'); <<$^O-eq-VMS>> -- cgit v1.2.1