Business-BancaSella
view release on metacpan or search on metacpan
BancaSella/Ric/File.pm view on Meta::CPAN
if ( $@ ) {
warn "WARNING. this platform don't implements 'flock'\n";
} elsif ( ! $has_lock ) {
die "SYSTEM. locking $self->{'file'} : $!\n";
}
# length of a row of password
my $row_length = 33;
my $size_bytes;
unless ( $size_bytes = (stat(REQUEST))[7] ) {
die (( $! ) ? $! : "EMPTY : the file $self->{'file'} is empty\n" );
}
if ( $size_bytes % $row_length != 0 ) {
die "CORRUPT. dimension of $self->{'file'} is wrong\n";
}
# number of passwords in the file
my $size = $size_bytes / $row_length;
# read the last password
BancaSella/Ric/FileFast.pm view on Meta::CPAN
if ( $@ ) {
warn "WARNING. this platform don't implements 'flock'\n";
} elsif ( ! $has_lock ) {
die "SYSTEM. locking $self->{'file'} : $!\n";
}
# length of a row of password
my $row_length = 33;
my $size_bytes;
unless ( $size_bytes = (stat(REQUEST))[7] ) {
die (( $! ) ? $! : "EMPTY : the file $self->{'file'} is empty\n" );
}
if ( $size_bytes % $row_length != 0 ) {
die "CORRUPT. dimension of $self->{'file'} is wrong\n";
}
# number of passwords in the file
my $size = $size_bytes / $row_length;
# read the last password
BancaSella/Ris/FileFast.pm view on Meta::CPAN
} elsif ( ! $has_lock ) {
close(RESPONSE);
die "SYSTEM. locking $self->{'file'} : $!\n";
}
# length of a row of password
my $row_length = 34;
# read the size of the file
my $size_bytes;
unless ( $size_bytes = (stat(RESPONSE))[7] ) {
close(RESPONSE);
if ( $! ne '' ) {
die $!;
} else {
die "EMPTY. file $self->{'file'} is empty\n";
}
}
if ( $size_bytes % $row_length != 0 ) {
close(RESPONSE);
die "CORRUPT. dimension of $self->{'file'} is wrong\n";
( run in 0.680 second using v1.01-cache-2.11-cpan-49f99fa48dc )