From 33ef301c311c9e7d49e3838dcaa5c6cdbd0466f6 Mon Sep 17 00:00:00 2001 From: don Date: Mon, 21 Feb 2011 03:06:48 +0000 Subject: [PATCH] Don't munge contents of __DATA__ even when they look like POD (closes: #614288) --- debian/changelog | 7 +++++++ lib/Perl/Tidy.pm | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b10f0b1..ca384b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +perltidy (20101217-2) UNRELEASED; urgency=low + + * Don't munge contents of __DATA__ even when they look like POD (closes: + #614288) + + -- Don Armstrong Sun, 20 Feb 2011 19:06:20 -0800 + perltidy (20101217-1) unstable; urgency=low * New upstream release (closes: #613417) diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 35cea35..2534df3 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -6215,7 +6215,10 @@ sub write_line { if ( $rOpts->{'tee-pod'} ) { $tee_line = 1; } if ( !$skip_line && $line_type eq 'POD_START' - && $last_line_type !~ /^(END|DATA)$/ ) + # If the previous line is a __DATA__ line (or data + # contents, it's not valid to change it at all, no + # matter what is in the data + && $last_line_type !~ /^(END|DATA(?:_START)?)$/ ) { want_blank_line(); } -- 2.39.2