| Catalyst-Model-Gedcom documentation | Contained in the Catalyst-Model-Gedcom distribution. |
Catalyst::Helper::Model::Gedcom - Helper for Gedcom models
script/myapp_create.pl model Gedcom Gedcom myfamily.ged
Helper for the Catalyst Gedcom model.
Makes the Gedcom model class.
Makes tests for the Gedcom model.
Brian Cassidy <bricas@cpan.org>
Copyright 2005-2009 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
[% class %] - Gedcom Catalyst model component
See [% app %].
Gedcom Catalyst model component.
[% author %]
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Catalyst-Model-Gedcom documentation | Contained in the Catalyst-Model-Gedcom distribution. |
package Catalyst::Helper::Model::Gedcom; use strict; use warnings; our $VERSION = '0.05';
sub mk_compclass { my ( $self, $helper, $filename ) = @_; die( 'No filename specified' ) unless $filename; $helper->{ filename } = $filename; $helper->render_file( 'modelclass', $helper->{ file } ); return 1; }
sub mk_comptest { my ( $self, $helper ) = @_; $helper->render_file( 'modeltest', $helper->{ test } ); }
1; __DATA__ __modelclass__ package [% class %]; use strict; use base qw( Catalyst::Model::Gedcom ); __PACKAGE__->config( gedcom_file => [% filename %], read_only => 1 );
1; __modeltest__ use Test::More tests => 2; use_ok(Catalyst::Test, '[% app %]'); use_ok('[% class %]');