Murat Ünalan > Class-Maker-Examples > Lockable

Download:
Class-Maker-Examples-0.01_02.tar.gz

Dependencies

Annotate this POD

Module Version: 0.03   Source  

NAME ^

Lockable - classes for locking mechanims

SYNOPSIS ^

  use Object::Lockable;
  blah blah blah

DESCRIPTION ^

Stub documentation for Object::Lockable, created by h2xs. It looks like the author of the extension was negligent enough to leave the stub unedited.

Blah blah blah.

EXAMPLE

my $lock = new Object::Lockable( showpackage => 1, debug => 1, limited => 5 ) or die "unable to instantiate object";

$lock->unlock();

print "Can't pass lock\n" if $lock->try;

$lock->lock();

print "Can't pass lock\n" if $lock->try;

my $key = '1234';

$lock->passkey( $key );

$lock->assert( $lock->try( KEY => $key ) );

$lock->lock();

for( 1..10 ) { printf "%d. try\n",$_;

        $lock->assert( $lock->try( KEY => '5678' ) );
}

$lock->assert( $lock->try( KEY => $key ) );

$lock->unblock();

$lock->assert( $lock->try( KEY => $key ) );

$lock->debugDump();

EXPORT

None by default.

AUTHOR ^

muenalan@cpan.org

SEE ALSO ^

perl(1).

syntax highlighting: