summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/Hints.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-03 11:43:24 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-03 11:43:24 -0500
commit901d24c23e59de511286986bfd1ff391eaa8b3f2 (patch)
treeea3e3bc1c60d98f307550d10ce1b1409aba547f5 /lib/Reply/Plugin/Hints.pm
parent95d6cfd3679870b6d265640b23e7537d657458ea (diff)
downloadreply-901d24c23e59de511286986bfd1ff391eaa8b3f2.tar.gz
reply-901d24c23e59de511286986bfd1ff391eaa8b3f2.zip
the #line stuff means that this doesn't have to be unreadable anymore
Diffstat (limited to 'lib/Reply/Plugin/Hints.pm')
-rw-r--r--lib/Reply/Plugin/Hints.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/Reply/Plugin/Hints.pm b/lib/Reply/Plugin/Hints.pm
index af557e3..ac31ceb 100644
--- a/lib/Reply/Plugin/Hints.pm
+++ b/lib/Reply/Plugin/Hints.pm
@@ -29,7 +29,21 @@ sub mangle_line {
my $self = shift;
my ($line) = @_;
- 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} }";
+ my $package = __PACKAGE__;
+ return <<LINE;
+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};
+}
+LINE
}
sub compile {