| Catalyst-Model-EVDB documentation | Contained in the Catalyst-Model-EVDB distribution. |
Catalyst::Helper::Model::EVDB - Helper for EVDB models
script/myapp_create.pl model EVDB EVDB app_key username password
Helper for the Catalyst EVDB model.
When creating a new EVDB model class using this helper, you can specify much of the configuration and have it filled automatically. Using the example from the SYNOPSIS section:
EVDBThe name of the model. This is also used to determine the filename,
e.g. lib/MyApp/Model/EVDB.pm.
EVDBThe helper to use, i.e. this one.
app_keyYour application key, as provided by EVDB. Please see http://api.evdb.com/ to obtain an application key.
username(Optional) Your EVDB username.
password(Optional) Your EVDB password.
Makes the EVDB model class.
Makes tests for the EVDB model.
Daniel Westermann-Clark <danieltwc@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Catalyst-Model-EVDB documentation | Contained in the Catalyst-Model-EVDB distribution. |
package Catalyst::Helper::Model::EVDB; use strict; use warnings;
sub mk_compclass { my ($self, $helper, $app_key, $username, $password) = @_; $helper->{app_key} = $app_key || ''; $helper->{username} = $username || ''; $helper->{password} = $password || ''; $helper->render_file('modelclass', $helper->{file}); return 1; }
sub mk_comptest { my ($self, $helper) = @_; $helper->render_file('modeltest', $helper->{test}); }
1; __DATA__
1; __modeltest__ use strict; use warnings; use Test::More tests => 2; use_ok('Catalyst::Test', '[% app %]'); use_ok('[% class %]');