Skip to content

Commit

Permalink
Do not inherit from Exporter
Browse files Browse the repository at this point in the history
requires Exporter 5.57
use Exporter qw(import) rather than
use Exporter; our @isa=('Exporter');
  • Loading branch information
genio committed Oct 11, 2018
1 parent b99cd1d commit d69d1ff
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion META.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ requires:
B: '0'
Carp: '0'
Errno: '0'
Exporter: '0'
Exporter: '5.57'
Fcntl: '0'
POSIX: '0'
strict: '0'
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ my %TestReqs = (
my %prereqs = (
'B' => 0,
'Carp' => 0,
'Exporter' => 0,
'Exporter' => '5.57',
'Errno' => 0,
'Fcntl' => 0,
'POSIX' => 0,
Expand Down
15 changes: 4 additions & 11 deletions lib/File/Slurp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,17 +26,14 @@ my @edit_export = qw(
edit_file_lines
) ;

my @ok_export = qw(
) ;

my @abbrev_export = qw(
rf
wf
ef
efl
) ;

@EXPORT_OK = (
our @EXPORT_OK = (
@edit_export,
@abbrev_export,
qw(
Expand All @@ -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 ;

Expand Down

0 comments on commit d69d1ff

Please sign in to comment.