this, sort of, works
[gitmo/MooseX-Antlers.git] / lib / MooseX / Antlers / RefFilter.pm
index 654bbc0..acfe798 100644 (file)
@@ -121,7 +121,7 @@ sub _fixup_code_for_externals {
       # is an attempt to modify a readonly value and perl will burst into tears
       # $whatever = \"foo"
       # is ok so if the match succeeds switch it to that
-      if ($l =~ m/^\${(.*)}$/) { $l = $1; $r = "\\".$r; }
+      if ($l =~ m/^\${(.*)}$/) { $l = $1; $r = "\\(".$r.")"; }
       $l.' = '.$r.';';
     }
     sort keys %$ext