projects
/
scpubgit/App-SCS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
a2cad2b
)
try not to lose the reference to $self
Matt S Trout [Tue, 22 Jan 2013 16:30:27 +0000 (16:30 +0000)]
lib/App/SCS.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/App/SCS.pm
b/lib/App/SCS.pm
index
af606f1
..
035c803
100644
(file)
--- a/
lib/App/SCS.pm
+++ b/
lib/App/SCS.pm
@@
-84,7
+84,11
@@
sub load_plugin {
sub run_if_script {
my $self = shift;
if (caller(1)) {
- return $self->web->to_psgi_app;
+ my $code;
+ return sub {
+ $code ||= $self->web->to_psgi_app;
+ &$code
+ };
} else {
return $self->run;
}