Applied HTTP.pm patch from Andy Grundman <andy@hybridized.org>. Fixed debug log on...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Request / Upload.pm
index 867c098..5891332 100644 (file)
@@ -8,7 +8,6 @@ use IO::File   ();
 
 __PACKAGE__->mk_accessors(qw/filename size tempname type/);
 
-sub new { shift->SUPER::new( ref( $_[0] ) ? $_[0] : {@_} ) }
 
 =head1 NAME
 
@@ -35,6 +34,14 @@ to the upload data.
 
 =over 4
 
+=item $upload->new
+
+Constructor. Normally only for engine use.
+
+=cut 
+
+sub new { shift->SUPER::new( ref( $_[0] ) ? $_[0] : {@_} ) }
+
 =item $upload->copy_to
 
 Copies tempname using C<File::Copy>. Returns true for success, false otherwise.
@@ -44,8 +51,8 @@ Copies tempname using C<File::Copy>. Returns true for success, false otherwise.
 =cut
 
 sub copy_to {
-    my ( $self, $target, $buffer ) = @_;
-    return File::Copy::copy( $self->tempname, $target, $buffer );
+    my $self = shift;
+    return File::Copy::copy( $self->tempname, @_ );
 }
 
 =item $upload->fh