From: Steve Hancock Date: Thu, 5 Oct 2023 14:39:54 +0000 (-0700) Subject: add note on zero-length input stream X-Git-Tag: 20230912.03~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e9ac84a613a1549c235e91ddcd6d947b2741288b;p=perltidy.git add note on zero-length input stream --- 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;