From: Steve Hancock Date: Fri, 25 Feb 2022 03:22:26 +0000 (-0800) Subject: check for undefined arg to parse_args X-Git-Tag: 20220217.01~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2a432168c8f3a88fa8fc88dbda153a9337bc5f9e;p=perltidy.git check for undefined arg to parse_args --- diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index a97b7aad..61efa37b 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -4226,6 +4226,11 @@ sub parse_args { my $quote_char = ""; my $part = ""; my $msg = ""; + + # Check for external call with undefined $body - added to fix + # github issue Perl-Tidy-Sweetened issue #23 + if ( !defined($body) ) { $body = "" } + while (1) { # looking for ending quote character