#328 Refactor: "Extract subroutine" backslashes single quotes

v0.7.x
closed-fixed
nobody
Editor (234)
5
2016-05-16
2006-11-03
No

The "Extract subroutine" refactoring mishandles
single-quoted strings. In the generated subroutine
they are all backslashed.

This:

my @bar = ();
push(@bar, 'boo');

------------

Is turned into this:

my @bar = ();
my () = extracted (\@bar);

sub extracted {
my $bar = shift;

push(
@$bar, \'boo\');
return ();
}

---------------

Note also that the "return ()" statement is unnecessary.

Discussion

  • Nobody/Anonymous

    Please fix this the bug is driving me crazy.

     
  • Oliver Trosien

    Oliver Trosien - 2016-05-12
    • Group: v0.5.x --> v0.7.x
     
  • Oliver Trosien

    Oliver Trosien - 2016-05-12

    Reproduced in 0.7.0.

     
  • Oliver Trosien

    Oliver Trosien - 2016-05-16
    • status: open --> closed-fixed
     
  • Oliver Trosien

    Oliver Trosien - 2016-05-16

    Fix merged on github and will be part of the upcoming 0.7.1 release.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks