DynGig-Util

 view release on metacpan or  search on metacpan

lib/DynGig/Util/EZDB.pm  view on Meta::CPAN

    my $handle = $this->{sth};

    return unless $table && $handle->{$table};

    my ( $sth, $result ) = $handle->{$table}{$name};

    while ( $sth )
    {   
        $result = eval { $sth->execute( @_ ) };
        last unless $@;
        croak $@ if $@ !~ /locked/;
    }

    return $result, $sth;
}

=head1 SEE ALSO

DBI

=head1 NOTE

lib/DynGig/Util/LockFile/PID.pm  view on Meta::CPAN

{
    my $this = shift;
    my $handle = $$this;

    sysseek $handle, 0, 0;
    return $handle;
}

=head2 check( $filename )

Returns ID of process that owns the lock. Returns 0 if not locked.

=cut
sub check
{
    my ( $class, $file ) = @_;

    croak 'lock file not defined' unless defined $file;

    my ( $handle, $pid );

lib/DynGig/Util/LockFile/Time.pm  view on Meta::CPAN

use constant { DURATION => 3600 * 12 };

=head1 SYNOPSIS

 use DynGig::Util::LockFile::Time;
 
 my $lock = '/lock/file/path';

 DynGig::Util::LockFile::Time->lock( $lock, epoch => 3600, duration => 1200 );

 die "locked\n" if my $seconds = DynGig::Util::LockFile::Time->check( $lock );

=head1 DESCRIPTION

=head2 lock( file, epoch => start, duration => seconds )

Writes time into the file.

=cut
sub lock
{



( run in 1.564 second using v1.01-cache-2.11-cpan-55f5a4728d2 )