summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-05-30 06:29:42 -0500
committerJesse Luehrs <doy@tozt.net>2013-05-30 06:29:42 -0500
commit8d856fdbf5d4afaff210b1fbc9b2639ae54f6464 (patch)
tree9a394735632f0a4760b9597d4cb9cd954c7b9a87
parent159bc18de6d8c1bd512dabdf5ad497258ddebe1d (diff)
downloadreply-8d856fdbf5d4afaff210b1fbc9b2639ae54f6464.tar.gz
reply-8d856fdbf5d4afaff210b1fbc9b2639ae54f6464.zip
make inline comments work
-rw-r--r--lib/Reply/Plugin/Defaults.pm2
-rw-r--r--lib/Reply/Plugin/Hints.pm2
-rw-r--r--lib/Reply/Plugin/Packages.pm2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/Reply/Plugin/Defaults.pm b/lib/Reply/Plugin/Defaults.pm
index 507c830..c71d329 100644
--- a/lib/Reply/Plugin/Defaults.pm
+++ b/lib/Reply/Plugin/Defaults.pm
@@ -32,7 +32,7 @@ sub compile {
my ($next, $line, %args) = @_;
return eval_closure(
- source => "sub { $PREFIX; $line }",
+ source => "sub {\n$PREFIX;\n$line\n}",
terse_error => 1,
%args,
);
diff --git a/lib/Reply/Plugin/Hints.pm b/lib/Reply/Plugin/Hints.pm
index ea0e953..af557e3 100644
--- a/lib/Reply/Plugin/Hints.pm
+++ b/lib/Reply/Plugin/Hints.pm
@@ -29,7 +29,7 @@ sub mangle_line {
my $self = shift;
my ($line) = @_;
- return "BEGIN { \$^H = \$" . __PACKAGE__ . "::hints; \%^H = \%\$" . __PACKAGE__ . "::hinthash; \${^WARNING_BITS} = \$" . __PACKAGE__ . "::warning_bits } $line; BEGIN { \$" . __PACKAGE__ . "::hints = \$^H; \$" . __PACKAGE__ . "::hinthash = \\\%^H; \$" . __PACKAGE__ . "::warning_bits = \${^WARNING_BITS} }";
+ return "BEGIN { \$^H = \$" . __PACKAGE__ . "::hints; \%^H = \%\$" . __PACKAGE__ . "::hinthash; \${^WARNING_BITS} = \$" . __PACKAGE__ . "::warning_bits }\n$line\n;BEGIN { \$" . __PACKAGE__ . "::hints = \$^H; \$" . __PACKAGE__ . "::hinthash = \\\%^H; \$" . __PACKAGE__ . "::warning_bits = \${^WARNING_BITS} }";
}
sub compile {
diff --git a/lib/Reply/Plugin/Packages.pm b/lib/Reply/Plugin/Packages.pm
index 6f3e32c..071e20b 100644
--- a/lib/Reply/Plugin/Packages.pm
+++ b/lib/Reply/Plugin/Packages.pm
@@ -17,7 +17,7 @@ sub mangle_line {
my $self = shift;
my ($line) = @_;
- return "package $self->{package}; $line; BEGIN { \$" . __PACKAGE__ . "::package = __PACKAGE__ }";
+ return "package $self->{package};\n$line\n;BEGIN { \$" . __PACKAGE__ . "::package = __PACKAGE__ }";
}
sub compile {