Skip to content

Commit

Permalink
Flipped order in say to be able to use the return value correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Timofey Potapov committed Jul 20, 2024
1 parent 35f8ff5 commit 0e5e86f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/e.pm
Original file line number Diff line number Diff line change
Expand Up @@ -745,10 +745,6 @@ sub import {
say => sub {
my @args = @_ ? @_ : ( $_ );

# Send to output incase something expects it there.
caller->can( "utf8" )->();
CORE::say( @args );

# Send to terminal.
# Needs to be explicitly closed to avoid
# issues with next say() if still closed:
Expand All @@ -762,6 +758,11 @@ sub import {
close $tty;
}
}

# Send to output incase something expects it there.
caller->can( "utf8" )->();
CORE::say( @args );

},

# Pretty Print.
Expand Down

0 comments on commit 0e5e86f

Please sign in to comment.