Skip to content
This repository
Browse code

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

Plack::TempBuffer: pre-load Plack::TempBuffer::* modules
  • Loading branch information...
commit f38a83c11994754b2b71ca3a0367fa25a4e63fc2 2 parents 9c47fb3 + d2b75da
Tatsuhiko Miyagawa authored September 11, 2012

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  lib/Plack/TempBuffer.pm
7  lib/Plack/TempBuffer.pm
... ...
@@ -1,8 +1,10 @@
1 1
 package Plack::TempBuffer;
2 2
 use strict;
3 3
 use warnings;
4  
-use Plack::Util;
5 4
 use FileHandle; # for seek etc.
  5
+use Plack::TempBuffer::PerlIO ();
  6
+use Plack::TempBuffer::File ();
  7
+use Plack::TempBuffer::Auto ();
6 8
 
7 9
 our $MaxMemoryBufferSize = 1024 * 1024;
8 10
 
@@ -29,7 +31,8 @@ sub new {
29 31
 
30 32
 sub create {
31 33
     my($class, $backend, $length, $max) = @_;
32  
-    Plack::Util::load_class($backend, $class)->new($length, $max);
  34
+    my $package = "$class\::$backend";
  35
+    $package->new($length, $max);
33 36
 }
34 37
 
35 38
 sub print;

0 notes on commit f38a83c

Please sign in to comment.
Something went wrong with that request. Please try again.