OpenMuseum - Data provider or the OpenMusem museum management system.
Version 0.11
This module is designed to interact with the databases used by OpenMuseum. The intent is to provide an object-oriented interface to the database, abstracting away the SQL heavy lifting.
Use:
use OpenMuseum; $om = OpenMuseum->new('config' => 'config.yaml'); $stat = $om->authen("username", "passwordhashhere"); #not necessarily a required step $rep = $om->report("SELECT id, name, address, email_address, expiry FROM members WHERE expiry LESSTHAN '2022/15/14'" "id"); # dostuff with the results of the report
The new routine returns an initialized OpenMuseum object.
This method takes arguments as a hash constructor.
EG: $om = OpenMuseum->new('config' => "config.yml");
One of the options must be config, and it must point to a file
Shh, nothing to see here...
This is an internal method used to parse the config file, and create the database handle used to query the system.
Another private method used to construct a DBN for the DBI system.
This method returns an array reference being a list of different entries in an authority file. it tkesone argument, the name of an authority file.
The authen function is used to authenticate a user, it takes two parameters: user and password.
The options function will get and set options. It takes two options, the key and the value, the value is optional and will continue to be the previous value. This returns current value of the option $key.
This function performs database reports, and is very handy. It takes two arguments, an SQL query and a reference column. THat is the name of a column to use as the lookup. It will either return a hashreference to the results of the query, or an error if the query was not a 'SELECT' query.
This routine takes at least one argument, a command. Possible commands are query, ids, retrieve, modify, and create.
Samuel W. Flint, <linuxkid at linux.com>
<linuxkid at linux.com>
Please report any bugs or feature requests to bug-openmuseum at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=OpenMuseum. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-openmuseum at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc OpenMuseum
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=OpenMuseum
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/OpenMuseum
CPAN Ratings
http://cpanratings.perl.org/d/OpenMuseum
Search CPAN
http://search.cpan.org/dist/OpenMuseum/
Copyright 2013 Samuel W. Flint.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991 or at your option any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
A copy of the GNU General Public License is available in the source tree; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
To install OpenMuseum, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenMuseum
CPAN shell
perl -MCPAN -e shell install OpenMuseum
For more information on module installation, please visit the detailed CPAN module installation guide.