Skip to content

Instantly share code, notes, and snippets.

@juster
Created May 15, 2010 03:49
Show Gist options
  • Save juster/401988 to your computer and use it in GitHub Desktop.
Save juster/401988 to your computer and use it in GitHub Desktop.
From 8e993c74faf873d159dcedfe90ae323930312663 Mon Sep 17 00:00:00 2001
From: Justin Davis <jrcd83@gmail.com>
Date: Fri, 14 May 2010 20:38:46 -0700
Subject: [PATCH] Fix broken -I option for plackup.
Explicitly 'require lib' before we try to use lib->import.
---
lib/Plack/Runner.pm | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/lib/Plack/Runner.pm b/lib/Plack/Runner.pm
index 4fa96c7..de83a23 100644
--- a/lib/Plack/Runner.pm
+++ b/lib/Plack/Runner.pm
@@ -128,7 +128,10 @@ sub setup {
exit;
}
- lib->import(@{$self->{includes}}) if @{$self->{includes}};
+ if (@{$self->{includes}}) {
+ require lib;
+ lib->import(@{$self->{includes}});
+ }
if ($self->{eval}) {
push @{$self->{modules}}, 'Plack::Builder';
--
1.7.1
@juster
Copy link
Author

juster commented May 15, 2010

This is the output from git format-patch. The last revision is from git diff ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment