diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-06-03 11:43:24 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-06-03 11:43:24 -0500 |
commit | 901d24c23e59de511286986bfd1ff391eaa8b3f2 (patch) | |
tree | ea3e3bc1c60d98f307550d10ce1b1409aba547f5 /lib/Reply/Plugin/Packages.pm | |
parent | 95d6cfd3679870b6d265640b23e7537d657458ea (diff) | |
download | reply-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/Packages.pm')
-rw-r--r-- | lib/Reply/Plugin/Packages.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Reply/Plugin/Packages.pm b/lib/Reply/Plugin/Packages.pm index 8e1b85b..fd48737 100644 --- a/lib/Reply/Plugin/Packages.pm +++ b/lib/Reply/Plugin/Packages.pm @@ -18,7 +18,15 @@ sub mangle_line { my $self = shift; my ($line) = @_; - return "package $self->{package};\n$line\n;BEGIN { \$" . __PACKAGE__ . "::package = __PACKAGE__ }"; + my $package = __PACKAGE__; + return <<LINE; +package $self->{package}; +$line +; +BEGIN { + \$${package}::package = __PACKAGE__; +} +LINE } sub compile { |