xsawyerx / ref-util-rewriter

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

rewrite_string is munging the lines #5

Closed atoomic closed 5 years ago

atoomic commented 5 years ago

As shown with the one-liner below it seems that rewrite_string is losing the beginning of the line, we should expect my $code = is_coderef($foo)

> perl -MRef::Util::Rewriter -E 'say Ref::Util::Rewriter::rewrite_string( q[ my $code = ref($foo) eq "CODE"] ); '
 is_coderef($foo)
xsawyerx commented 5 years ago

With the merged fixes, I think this is resolved. (Tried running the code and it doesn't trim it.)