From fa3f1faf9a27f5a500328b7ac8c76944a24a87a4 Mon Sep 17 00:00:00 2001 From: Toddr Bot Date: Wed, 15 Apr 2026 12:01:07 +0000 Subject: [PATCH] fix: add use strict and use warnings to Makefile.PL files Both Makefile.PL and Expat/Makefile.PL lacked strict and warnings pragmas. The top-level Makefile.PL also used bare package globals ($expat_libpath, $expat_incpath) instead of lexical variables. - Add 'use strict' and 'use warnings' to both files - Convert package globals to lexical (my) variables in Makefile.PL (Expat/Makefile.PL already used 'my') Co-Authored-By: Claude Opus 4.6 --- Expat/Makefile.PL | 2 ++ Makefile.PL | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Expat/Makefile.PL b/Expat/Makefile.PL index 8603c62..1ac1a70 100644 --- a/Expat/Makefile.PL +++ b/Expat/Makefile.PL @@ -1,3 +1,5 @@ +use strict; +use warnings; use ExtUtils::MakeMaker; use Config; use lib '../inc'; diff --git a/Makefile.PL b/Makefile.PL index 68aca7a..dcbcebe 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,6 @@ use 5.008; #Devel::CheckLib +use strict; +use warnings; use ExtUtils::MakeMaker; use lib './inc'; use Devel::CheckLib; @@ -8,8 +10,8 @@ install_share dist => 'share'; use Config; use File::Spec; -$expat_libpath = $ENV{EXPATLIBPATH} || ''; -$expat_incpath = $ENV{EXPATINCPATH} || ''; +my $expat_libpath = $ENV{EXPATLIBPATH} || ''; +my $expat_incpath = $ENV{EXPATINCPATH} || ''; my @replacement_args;