projects
/
catagits/Web-Simple.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
d104fb1
)
make Class->as_psgi_app only call ->new once
Matt S Trout [Thu, 7 Oct 2010 18:24:59 +0000 (19:24 +0100)]
lib/Web/Simple/Application.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Web/Simple/Application.pm
b/lib/Web/Simple/Application.pm
index
3bdbd97
..
d52dc78
100644
(file)
--- a/
lib/Web/Simple/Application.pm
+++ b/
lib/Web/Simple/Application.pm
@@
-260,8
+260,8
@@
sub _run_fcgi {
}
sub as_psgi_app {
- my $self = shift;
- ref($self) ? sub { $self->_dispatch(@_) } : sub { $self->new->_dispatch(@_) }
+ my $self = ref($_[0]) ? $_[0] : $_[0]->new;
+ sub { $self->_dispatch(@_) };
}
sub run {