From e9ac84a613a1549c235e91ddcd6d947b2741288b Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 5 Oct 2023 07:39:54 -0700 Subject: [PATCH] add note on zero-length input stream --- lib/Perl/Tidy.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index c4d68aed..c1fc82ac 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -1562,6 +1562,17 @@ sub get_decoded_string_buffer { my $rinput_string = stream_slurp($input_file); return unless ( defined($rinput_string) ); + # Note that we could have a zero size input string here if it + # arrived from standard input or from a string ref. For example + # 'perltidy set_line_separator($rinput_string); my $encoding_in = EMPTY_STRING; -- 2.39.5