— |
our $VERSION = '0.063_003' ;
$Carp::Internal {(__PACKAGE__)}++;
sub addfile {
my ( $self , $file ) = @_ ;
my $handle ;
if ( ref (\ $file ) eq 'SCALAR' ) {
open ( $handle , "<" , $file ) || die "FATAL: cannot open '$file': $!" ;
binmode ( $handle );
}
else {
$handle = $file
}
die "FATAL: invalid handle" unless defined $handle ;
my $n ;
my $buf = "" ;
local $SIG {__DIE__} = \ &CryptX::_croak ;
while (( $n = read ( $handle , $buf , 32*1024))) {
$self ->add( $buf );
}
die "FATAL: read failed: $!" unless defined $n ;
return $self ;
}
sub CLONE_SKIP { 1 }
1;
|