View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Luis Muñoz > DNS-BL-0.03 > DNS::BL::cmds::connect::db



Annotate this POD

View/Report Bugs
Module Version: 0.00_01   Source  


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


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


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:


See DNS::BL::cmds 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 DNS::BL. Prior connect() information is to be removed by the calling class.


None by default.


$Log:,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


Perl(1), DNS::BL.


Luis Muñoz, <>


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.

syntax highlighting: