Hypatia::DBI
version 0.029
These are strings that are fed directly into the connect method of DBI. The <dsn> attribute is not required as long as you pass an active database handle into the dbh attribute (see below). Both username and password default to "" (which is useful if, for example, you're using a SQLite database). The hash reference attributes contains any optional key-value pairs to be passed to DBI's connect method. See the DBI documentation for more details.
connect
dbh
username
password
""
attributes
These strings represent the source of the data within the database represented by dsn. In other words, if your data source is from DBI, then you can pull data via a table name (table) or via a query (query). Don't set both of these, as this will cause your script to die.
dsn
table
query
This optional attribute is the database handle that will be used to grab the data. If it is not supplied, then a connection will be made using the dsn,username,password, and attributes attributes (if possible).
data(@columns,{query=>$query}])
This method grabs the resulting data from the query returned by the build_query method. The returned data structure is a hash reference of array references where the keys correspond to column names (ie the elements of the @columns array) and the values of the hash reference are the values of the given column returned by the query from the _build_query method.
build_query
@columns
_build_query
The optional hash reference argument allows for the overriding of the query generated by the _build_query method.
Jack Maney <jack@jackmaney.com>
This software is copyright (c) 2012 by Jack Maney.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Hypatia, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hypatia
CPAN shell
perl -MCPAN -e shell install Hypatia
For more information on module installation, please visit the detailed CPAN module installation guide.