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".
DNS::BL
tie()
untie()
The following methods are implemented by this module:
->execute()
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
DNS::BL::cmds::connect
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.
use
execute()
connect()
None by default.
$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
Perl(1), DNS::BL.
Luis Muñoz, <luismunoz@cpan.org>
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.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Muñoz,'. Assuming CP1252
To install DNS::BL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DNS::BL
CPAN shell
perl -MCPAN -e shell install DNS::BL
For more information on module installation, please visit the detailed CPAN module installation guide.