From d69d1ffc113face3959fd8cd8b21dacd9b1dd686 Mon Sep 17 00:00:00 2001 From: Chase Whitener Date: Wed, 10 Oct 2018 21:55:21 -0400 Subject: [PATCH] Do not inherit from Exporter requires Exporter 5.57 use Exporter qw(import) rather than use Exporter; our @ISA=('Exporter'); --- Changes | 1 + META.yml | 2 +- Makefile.PL | 2 +- lib/File/Slurp.pm | 15 ++++----------- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Changes b/Changes index 89b2a16..8feca56 100644 --- a/Changes +++ b/Changes @@ -8,6 +8,7 @@ Revision history File::Slurp - Dump the POD to GH markdown for a README.md - Remove the README file - Remove some work-arounds for older Perls < 5.6 + - Do not inherit from Exporter (requires Exporter 5.57) 9999.21 2018-10-08 - Unset $^W in a few strategic places to silence warnings when Test::Harness diff --git a/META.yml b/META.yml index 6cf0051..0a9c7e3 100644 --- a/META.yml +++ b/META.yml @@ -36,7 +36,7 @@ requires: B: '0' Carp: '0' Errno: '0' - Exporter: '0' + Exporter: '5.57' Fcntl: '0' POSIX: '0' strict: '0' diff --git a/Makefile.PL b/Makefile.PL index f0b4d3a..74151d9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -37,7 +37,7 @@ my %TestReqs = ( my %prereqs = ( 'B' => 0, 'Carp' => 0, - 'Exporter' => 0, + 'Exporter' => '5.57', 'Errno' => 0, 'Fcntl' => 0, 'POSIX' => 0, diff --git a/lib/File/Slurp.pm b/lib/File/Slurp.pm index 52e2382..af77e02 100644 --- a/lib/File/Slurp.pm +++ b/lib/File/Slurp.pm @@ -7,15 +7,11 @@ our $VERSION = '9999.22_01'; $VERSION = eval $VERSION; use Carp ; -use Exporter ; +use Exporter qw(import); use Fcntl qw( :DEFAULT ) ; use File::Spec; use POSIX qw( :fcntl_h ) ; use Errno ; -#use Symbol ; - -use vars qw( @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS ) ; -@ISA = qw( Exporter ) ; my @std_export = qw( read_file @@ -30,9 +26,6 @@ my @edit_export = qw( edit_file_lines ) ; -my @ok_export = qw( -) ; - my @abbrev_export = qw( rf wf @@ -40,7 +33,7 @@ my @abbrev_export = qw( efl ) ; -@EXPORT_OK = ( +our @EXPORT_OK = ( @edit_export, @abbrev_export, qw( @@ -49,14 +42,14 @@ my @abbrev_export = qw( ), ) ; -%EXPORT_TAGS = ( +our %EXPORT_TAGS = ( 'all' => [ @std_export, @edit_export, @abbrev_export, @EXPORT_OK ], 'edit' => [ @edit_export ], 'std' => [ @std_export ], 'abr' => [ @abbrev_export ], ) ; -@EXPORT = @std_export ; +our @EXPORT = @std_export ; my $max_fast_slurp_size = 1024 * 100 ;