From 68b874eb70b79d6f804195c95af61c5ce4686667 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 13 Jul 2017 04:22:57 +0200 Subject: [PATCH 1/2] Import Exporter's import instead of setting @ISA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is one of the modern forms to get at the import. Use it instead of inheriting from Exporter and using the deprecated «use vars». --- lib/File/Path.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 681bb44..9771a0d 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -16,11 +16,10 @@ BEGIN { } } -use Exporter (); -use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); +use Exporter qw(import); +use vars qw($VERSION @EXPORT @EXPORT_OK); $VERSION = '2.17'; $VERSION = eval $VERSION; -@ISA = qw(Exporter); @EXPORT = qw(mkpath rmtree); @EXPORT_OK = qw(make_path remove_tree); From 74d4515a115c38b5c2ed8e18bdf1f3e3cf427b2b Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 13 Jul 2017 04:25:29 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Switch=20from=20=C2=ABuse=20vars=C2=BB=20to?= =?UTF-8?q?=20=C2=ABour=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The former is deprecated and has a non-insignificant cost of loading a module. --- lib/File/Path.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 9771a0d..da9b66f 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -17,11 +17,11 @@ BEGIN { } use Exporter qw(import); -use vars qw($VERSION @EXPORT @EXPORT_OK); -$VERSION = '2.17'; -$VERSION = eval $VERSION; -@EXPORT = qw(mkpath rmtree); -@EXPORT_OK = qw(make_path remove_tree); + +our $VERSION = '2.17'; +$VERSION = eval $VERSION; +our @EXPORT = qw(mkpath rmtree); +our @EXPORT_OK = qw(make_path remove_tree); BEGIN { for (qw(VMS MacOS MSWin32 os2)) {