summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2015-12-02 20:51:30 -0500
committerJesse Luehrs <doy@tozt.net>2015-12-02 20:54:40 -0500
commitb09901c5c1c9b024cb4253e85b3263b992339339 (patch)
tree40ef1e97f0f79f5202d87527975aac8e35e34b3d
parent4a19c586a3ad3f3a8ca1b8b3dc2ba761c57e8cb9 (diff)
downloadreply-b09901c5c1c9b024cb4253e85b3263b992339339.tar.gz
reply-b09901c5c1c9b024cb4253e85b3263b992339339.zip
set a default package in case the Packages plugin isn't used (#45)
-rw-r--r--Changes1
-rw-r--r--lib/Reply/Plugin/Defaults.pm1
2 files changed, 2 insertions, 0 deletions
diff --git a/Changes b/Changes
index 2543464..10ade99 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
Revision history for Reply
{{$NEXT}}
+ - fix running reply without the Package plugin (2shortplanks, #45)
0.37 2014-11-18
- internal refactoring for extensibility (sergeyromanov, #41)
diff --git a/lib/Reply/Plugin/Defaults.pm b/lib/Reply/Plugin/Defaults.pm
index e7874e3..bbe5934 100644
--- a/lib/Reply/Plugin/Defaults.pm
+++ b/lib/Reply/Plugin/Defaults.pm
@@ -48,6 +48,7 @@ sub compile {
my $env = { map { %$_ } $self->publish('lexical_environment') };
my $package = ($self->publish('package'))[-1];
+ $package = 'main' unless defined $package;
my $prefix = "package $package;\n$PREFIX";