Wikileaks::AfWD - Useful utilities for searching the Afganistan War Diary.
Version 0.1.0
use Wikileaks::AfWD; my $foo = Wikileaks::AfWD->new(); ...
This initiates the object.
It takes a optional hash reference.
If both "dbb" and "dbhCS" is specified, "dbi" will be used.
If none are specified, it checks for envriromental variables.
This is the DBH to use.
This is the DBI connection string to use.
If using "dbhCS", this will be checked for the user name to use.
If not specified, it will be set to "".
If using "dbhCS", this will be checked for the password to use.
This is the table to search.
If not specified, "war_diary" is used.
This performs a search. This searches the table, specified in new, and returns the resutls.
One arguement is taken and is appended to the select statement.
For example if we wish to select every report where the dcolor is "BLUE", we would set it to "dcolor='BLUE'", making the resulting string "SELECT * FROM war_diary WHERE dcolor='BLUE';".
What is returned is the resulting statement handle, post execute.
my $sth=$foo->search($WHERE);
This formats the statement handler from the search method.
This is what should be used to join the entries.
The default is "\n\n---------------------------------------------------------------------------\n\n".
If defined, it will be printed and '' will be returned.
This is the statement handler to use. Generally what is returned from the search method.
This is the Text::NeatTemplate to use.
This returns the current error code if one is set. If undef/evaulates as false then no error is present. Other wise one is.
if($foo->error){ warn('error '.$foo->error.': '.$foo->errorString); }
This returns the current error string. A return of "" means no error is present.
my $errorString=$foo->errorString;
This blanks the error storage and is only meant for internal usage.
It does the following.
$self->{error}=undef; $self->{errorString}="";
The error code is contianed in $foo->{error} and a extended description can be found in $foo->{errorString}. If any module ever sets $foo->{perror} then the error is permanent and none of the methods are usable.
The database handle passed is not a "DBI::db" object.
Failed to create the DBI connection.
No statement handle passed.
If neither "dbiCS" or "dbh" is specified for the new method, this will be used.
This if $ENV{AfWD_DBICS} is used, this will be checked for the user.
This if $ENV{AfWD_DBICS} is used, this will be checked for the password.
Zane C. Bowers-Hadley, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-dbi-wikileaks-afwd at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Wikileaks-AfWD. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-dbi-wikileaks-afwd at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Wikileaks::AfWD
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Wikileaks-AfWD
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Wikileaks-AfWD
CPAN Ratings
http://cpanratings.perl.org/d/Wikileaks-AfWD
Search CPAN
http://search.cpan.org/dist/Wikileaks-AfWD/
Copyright 2011 Zane C. Bowers-Hadley.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Wikileaks::AfWD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wikileaks::AfWD
CPAN shell
perl -MCPAN -e shell install Wikileaks::AfWD
For more information on module installation, please visit the detailed CPAN module installation guide.