Yeah, pretty much except that I pass a reference to the object. My call
evolved from passing the blob of stuff to write in a var that I passed as a
reference to avoid having a dozen copies of it (passed by value) made on the
stack. Maybe passing an object by reference is bad form? My usage
currently goes something like:
my $fh = new FileHandle $myfile, 'r';
$resp = HTTP::Request->new(
'PUT',
$remote,
$headers,
\$fh,
);
on 4/30/02 10:17 AM, Jeff Hallgren at [EMAIL PROTECTED] wrote:
> If you are checking for a reference to a FileHandle object why not just
> message it like an object?
> Also, can you provide an example of how I would use this?
>
> Something like this?
>
> my $fh = new FileHandle "< $myfile";
> my $req = HTTP::Request->new(
> 'PUT',
> 'http://my.host/davFolder',
> $headers,
> $fh
> );
>
>
>
> On Tuesday, April 30, 2002, at 09:45 AM, Peter Eisch wrote:
>
>>
>> By popular request:
>>
>> Attached is my patch to 5.64 that accommodates the ability to pass in a
>> FileHandle which then gets read from rather than passing the in a
>> scalar or
>> using the callback. The issue came up when trying to PUT a file that's
>> larger than the VM on the system it's running.
>>
>> Could this be considered as an enhancement to the package?
>>
>> Thanks,
>>
>> Peter
>>
>>
>