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

DNS::BL::cmds::connect::db
Implement the DB connect command for DNS::BL

DNS::BL::cmds::connect::db - Implement the DB connect command for DNS::BL



NAME

DNS::BL::cmds::connect::db - Implement the DB connect command for DNS::BL


SYNOPSIS


  use DNS::BL::cmds::connect::db;


DESCRIPTION

This module implements the connection to a DB backend where DNS::BL data will be stored. On each call to this class' methods, a hash will be tie()d and then untie()d. This guarantees that the underlying DB structure will be unlocked and available for other commands that may, for instance, replace or manipulate the hash ``from under us''.

The following methods are implemented by this module:

->execute()
See the DNS::BL::cmds manpage for information on this method's purpose.

The connect command follows a syntax such as


  connect db <args> ...

Note that the 'connect' token must be removed by the calling class, usually DNS::BL::cmds::connect. args are key - value pairs specifying different parameters as described below. Unknown parameters are reported as errors. The complete calling sequence is as


  connect db file "filename" [mode bulk]

Where ``filename'' refers to the DB file where data is to be found. If the file does not exist, it will be created (provided that permissions allow).

If ``mode bulk'' is indicated, arrangements are made to tie() to the database once. This makes the operation slightly faster, but increases the chance of collision when concurrent access to the backing store is performed.

This class will be used and then, its execute() method invoked following the same protocol outlined in the DNS::BL manpage. Prior connect() information is to be removed by the calling class.

EXPORT

None by default.


HISTORY

$Log: db.pm,v $ Revision 1.5 2004/11/09 22:49:20 lem Return valid results even with slightly corrupt indexes

Revision 1.4 2004/10/24 20:29:51 lem Added an index to speed up _read and _match

Revision 1.3 2004/10/21 18:33:08 lem Added rudimentary import support + bulk mode

Revision 1.2 2004/10/12 17:44:46 lem Updated docs. Added print with format

Revision 1.1 2004/10/11 21:16:34 lem Basic db and commands added


SEE ALSO

Perl(1), the DNS::BL manpage.


AUTHOR

Luis Muņoz, <luismunoz@cpan.org>


COPYRIGHT AND LICENSE

Copyright 2004 by Luis Muņoz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy