Skip to content

Commit 4895e8a

Browse files
Revert "(GH-14) Fix inconsistency in PPI::Token::HereDoc->heredoc()."
This reverts commit 49b2c9b. Upon further investigation, I found that the issue is not in PPI but in the test cases in this module. I will commit a fix for those separately, but I am reverting the PPI workaround and I have cancelled the PPI pull request accordingly.
1 parent 49b2c9b commit 4895e8a

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/Perl/Critic/Policy/ValuesAndExpressions/PreventSQLInjection.pm

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -413,17 +413,6 @@ sub get_token_content
413413
if ( $token->isa('PPI::Token::HereDoc') )
414414
{
415415
my @heredoc = $token->heredoc();
416-
417-
# Due to a bug in PPI::Token::Heredoc, $token->heredoc():
418-
# - does not include the terminator line when the terminator is a simple
419-
# bareword;
420-
# - includes the terminator line in the other cases (single/double
421-
# quoted , commands, escaped).
422-
# See https://github.com/adamkennedy/PPI/pull/71, but in the meantime this
423-
# addresses the inconsistency:
424-
pop( @heredoc )
425-
if $token->content() =~ /^\<\<['"`\\]/;
426-
427416
$content = join( '', @heredoc );
428417
}
429418
elsif ( $token->isa('PPI::Token::Quote' ) )

0 commit comments

Comments
 (0)