xsawyerx / ref-util-rewriter

Rewrite your code to use Ref::Util
Other
1 stars 2 forks source link

here-doc are lost after using rewrite_string #15

Open atoomic opened 5 years ago

atoomic commented 5 years ago

when rewriting a file/string using one here-doc the content is lost...

#!perl

use Ref::Util::Rewriter;

my $content = <<'TEST';
my $ref = ref $xyz;
my $str = <<EOS
my string content
EOS
TEST

print "Before:\n". $content . "\n";
my $after = Ref::Util::Rewriter::rewrite_string( $content );
print "After:\n". $after . "\n";

> perl test.pl
Before:
my $ref = ref $xyz;
my $str = <<EOS
my string content
EOS

After:
my $ref = ref $xyz;
my $str = <<EOS
xsawyerx commented 5 years ago

Weird...