Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Mysql::Locker
Safe way of locking and unlocking MySQL tables.

Mysql::Locker - Safe way of locking and unlocking MySQL tables.


NAME

Mysql::Locker - Safe way of locking and unlocking MySQL tables.


SYNOPSIS


 use Mysql::Locker;

 # Create table locks

 my $locker = new Mysql::Locker($dbh,

                                {'Customers' => 'READ',

                                 'Articles' => 'WRITE'});

 # Execute some tricky statements here...

 # Locks are automically released when $locker goes out of scope.

 undef($locker);


DESCRIPTION

Mysql::Locker is a simple class for safely using MySQL locks. Locks are created when you instantiate the class and are automatically released when the object goes out of scope (or when you call undef on the object). One situation where this class is useful is when you have persistent database connections such as in some mod_perl scripts and you want to be sure that locks are always released even when a script dies somewhere unexpectedly.


CLASS METHODS

new ($dbh,$locks);
Returns a new Mysql::Locker object.


HISTORY

Version 1.00 2002-01-02
Initial version


AUTHOR

Craig Manley c.manley@skybound.nl


COPYRIGHT

Copyright (C) 2001 Craig Manley <c.manley@skybound.nl>. All rights reserved. This program is free software; you can redistribute it and/or modify it under under the same terms as Perl itself. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy