summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/Defaults.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Reply/Plugin/Defaults.pm')
-rw-r--r--lib/Reply/Plugin/Defaults.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Reply/Plugin/Defaults.pm b/lib/Reply/Plugin/Defaults.pm
index 0296c70..b0c4e88 100644
--- a/lib/Reply/Plugin/Defaults.pm
+++ b/lib/Reply/Plugin/Defaults.pm
@@ -25,7 +25,14 @@ sub read_line {
return scalar <>;
}
-my $PREFIX = "package main; BEGIN { \$^H = \$" . __PACKAGE__ . "::default_hints; \%^H = \%\$" . __PACKAGE__ . "::default_hinthash; \${^WARNING_BITS} = \$" . __PACKAGE__ . "::default_warning_bits }";
+(my $PREFIX = <<'PREFIX') =~ s/__PACKAGE__/__PACKAGE__/ge;
+package main;
+BEGIN {
+ $^H = $__PACKAGE__::default_hints;
+ %^H = %$__PACKAGE__::default_hinthash;
+ ${^WARNING_BITS} = $__PACKAGE__::default_warning_bits;
+}
+PREFIX
sub compile {
my $self = shift;