in reply to Convert FileHandle to IO::File object

You could try to simply bless it into an IO::File object. The following works, but i am not sure if it will work in CGI context.
use strict; use warnings; use IO::File; use Archive::Zip; my $fh; my $zip = Archive::Zip->new(); open $fh, '<', 'c:/test.zip'; bless $fh, 'IO::File'; $zip->readFromFileHandle($fh); print $_->fileName, "\n" for $zip->members;


holli, /regexed monk/

Replies are listed 'Best First'.
Re^2: Convert FileHandle to IO::File object
by ganeshk (Monk) on Jul 28, 2005 at 10:17 UTC
    Hi,
    Thanks very much for the reply, holli.
    Blessing the object to IO::File worked.
    Thanks