Permalink
Browse files

Merge pull request #328 from avar/pre-load-tempbuffer-modules

Plack::TempBuffer: pre-load Plack::TempBuffer::* modules
  • Loading branch information...
miyagawa committed Sep 11, 2012
2 parents 9c47fb3 + d2b75da commit f38a83c11994754b2b71ca3a0367fa25a4e63fc2
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/Plack/TempBuffer.pm
View
@@ -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;

0 comments on commit f38a83c

Please sign in to comment.