Skip to content

Commit

Permalink
Fix stat() in array context in 0.pm and 1.pm as per 2.pm (evalEmpire#291
Browse files Browse the repository at this point in the history
)
  • Loading branch information
pghmcfc committed Feb 24, 2018
1 parent aa1124b commit 411fe0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/perl5i/0.pm
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ sub load_in_caller {

# File::stat does not play nice in list context
sub stat {
return CORE::stat(@_) if wantarray;
return CORE::stat($_[0]) if wantarray;
return File::stat::stat(@_);
}

sub lstat {
return CORE::lstat(@_) if wantarray;
return CORE::lstat($_[0]) if wantarray;
return File::stat::lstat(@_);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/perl5i/1.pm
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ sub load_in_caller {

# File::stat does not play nice in list context
sub stat {
return CORE::stat(@_) if wantarray;
return CORE::stat($_[0]) if wantarray;
return File::stat::stat(@_);
}

sub lstat {
return CORE::lstat(@_) if wantarray;
return CORE::lstat($_[0]) if wantarray;
return File::stat::lstat(@_);
}

Expand Down

0 comments on commit 411fe0f

Please sign in to comment.