NAME
Catalyst::Helper::Model::ISBNDB - Catalyst::Helper assist for ISBNDB
SYNOPSIS
perl script/myapp_create.pl model MyISBNDB ISBNDB API_KEY
DESCRIPTION
This is a Catalyst::Helper component to allow you to add model components deriving from the Catalyst::Model::ISBNDB class, using the Catalyst-generated create.pl
helper-script.
When run via the creation-helper, a new model class and a simple test suite for it will be added to your Catalyst application. The class will be added in the same directory as your other models, and the test added to the t/
directory in the top-level of the project.
USAGE
When the helper script is invoked, you provide it with 3 or 4 arguments:
model
-
This is always
model
, when adding a model component. MyClass
-
The name of the new class you want to add.
ISBNDB
-
The name of the model class you are deriving from, ISBNDB in this case.
API_KEY
-
(This parameter is optional.)
The isbndb.com API key your application will be using, if you wish to have it explicitly defined in the configuration block of the new class.
You can provide just model
and ISBNDB
alone (two arguments), in which case the new class will be given a name using your project's class hierarchy and ending in ISBNDB
, and no default API key will be configured.
METHODS
This class defines the following two methods:
- mk_compclass($SELF, $HELPER, [$KEY])
-
Creates the class by using the Catalyst::Helper instance pointed to by
$HELPER
. If$KEY
is passed and is non-null, the call toconfig
in the generated class will set the value as the default API key used for data calls to isbndb.com. - mk_comptest($SELF, $HELPER)
-
Creates the unit test suite for the new model. Does this by using the
Catalyst::Helper
instance pointed to by$HELPER
.
SEE ALSO
Catalyst::Model::ISBNDB, Catalyst::Helper
AUTHOR
Randy J. Ray <rjray@blackperl.com>
COPYRIGHT
This module and the code within are copyright (c) 2006 by Randy J. Ray and released under the terms of the Artistic License (http://www.opensource.org/licenses/artistic-license.php). This code may be redistributed under either the Artistic License or the GNU Lesser General Public License (LGPL) version 2.1 (http://www.opensource.org/licenses/lgpl-license.php).