Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/Path/Tiny.pm
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ sub append {
$binmode = ( ( caller(0) )[10] || {} )->{'open>'} unless defined $binmode;
my $mode = $args->{truncate} ? ">" : ">>";
my $fh = $self->filehandle( { locked => 1 }, $mode, $binmode );
print( {$fh} map { ref eq 'ARRAY' ? @$_ : $_ } @data ) or self->_throw('print');
print( {$fh} map { ref eq 'ARRAY' ? @$_ : $_ } @data ) or $self->_throw('print');
close $fh or $self->_throw('close');
}

Expand Down Expand Up @@ -1031,7 +1031,7 @@ sub edit_lines {
while (! eof($in_fh) ) {
defined( $_ = readline($in_fh) ) or $self->_throw('readline');
$cb->();
$temp_fh->print($_) or self->_throw('print', $temp);
$temp_fh->print($_) or $self->_throw('print', $temp);
}

close $temp_fh or $self->_throw( 'close', $temp );
Expand Down Expand Up @@ -2174,7 +2174,7 @@ sub spew {
: "error opening temp file for atomic write: $@";
$self->_throw('spew', $self->[PATH], $msg);
}
print( {$fh} map { ref eq 'ARRAY' ? @$_ : $_ } @data) or self->_throw('print', $temp->[PATH]);
print( {$fh} map { ref eq 'ARRAY' ? @$_ : $_ } @data) or $self->_throw('print', $temp->[PATH]);
close $fh or $self->_throw( 'close', $temp->[PATH] );

return $temp->move($resolved_path);
Expand Down