Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Plack::TempBuffer: pre-load Plack::TempBuffer::* modules

Change the Plack::TempBuffer module so that we pre-load the ::PerlIO,
::File and ::Auto modules. These modules are really small, and by
use-ing them here we'll have them pre-loaded in pre-forking
webservers.
  • Loading branch information...
commit d2b75dab6192c142e63b5a902ce186b3d8c26b88 1 parent 9c47fb3
@avar avar authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/Plack/TempBuffer.pm
View
7 lib/Plack/TempBuffer.pm
@@ -1,8 +1,10 @@
package Plack::TempBuffer;
use strict;
use warnings;
-use Plack::Util;
use FileHandle; # for seek etc.
+use Plack::TempBuffer::PerlIO ();
+use Plack::TempBuffer::File ();
+use Plack::TempBuffer::Auto ();
our $MaxMemoryBufferSize = 1024 * 1024;
@@ -29,7 +31,8 @@ sub new {
sub create {
my($class, $backend, $length, $max) = @_;
- Plack::Util::load_class($backend, $class)->new($length, $max);
+ my $package = "$class\::$backend";
+ $package->new($length, $max);
}
sub print;
Please sign in to comment.
Something went wrong with that request. Please try again.