OpenMuseum - Data provider or the OpenMusem museum management system.
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 OpenMuseum; $om = OpenMuseum->new(-host => 'localhost', -db => 'openmuseum', -username => 'museum', -password => 'password'); $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(options here);
These arguments will default, as shown here
-username museummate -password ImAVeryBadPassword -host localhost -db openmusem
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>
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.
You can find documentation for this module with the perldoc command.
You can also look for information at:
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.