X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FHTTP%2FBody.pm;h=12216d62118d61f633c1dc9c8238c08ac22ee934;hb=3debb7c03ca0bf95876fec1b62ec76026cce434a;hp=7c1d5e0cc4b8387e39706f77f1ad36ed27e4e9c5;hpb=2759ad98dfed7d927a85b5c8b7b05e9c44aef420;p=catagits%2FHTTP-Body.git diff --git a/lib/HTTP/Body.pm b/lib/HTTP/Body.pm index 7c1d5e0..12216d6 100644 --- a/lib/HTTP/Body.pm +++ b/lib/HTTP/Body.pm @@ -4,7 +4,7 @@ use strict; use Carp qw[ ]; -our $VERSION = '1.03'; +our $VERSION = '1.04'; our $TYPES = { 'application/octet-stream' => 'HTTP::Body::OctetStream', @@ -113,7 +113,8 @@ sub new { length => 0, param => {}, state => 'buffering', - upload => {} + upload => {}, + tmpdir => File::Spec->tmpdir(), }; bless( $self, $body ); @@ -355,6 +356,18 @@ sub upload { return $self->{upload}; } +=item tmpdir + +Specify a different path for temporary files. Defaults to the system temporary path. + +=cut + +sub tmpdir { + my $self = shift; + $self->{tmpdir} = shift if @_; + return $self->{tmpdir}; +} + =back =head1 AUTHOR