| 1 | package Catalyst::Model::Gedcom; | ||
| 2 | |||
| 3 | 2 | ▶ | use base qw( Gedcom ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 2 | our $VERSION = '0.05'; | |
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | Catalyst::Model::Gedcom - Gedcom Model Class | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | # lib/MyApp/Model/Gedcom.pm | ||
| 17 | package MyApp::Model::Gedcom; | ||
| 18 | |||
| 19 | use base qw( Catalyst::Model::Gedcom ); | ||
| 20 | |||
| 21 | __PACKAGE__->config( | ||
| 22 | gedcom_file => 'root/my.ged', | ||
| 23 | read_only => 1 | ||
| 24 | ); | ||
| 25 | |||
| 26 | 1; | ||
| 27 | |||
| 28 | my $gedcom = $c->model( 'Gedcom' ); | ||
| 29 | |||
| 30 | my @individuals = $gedcom->individuals; | ||
| 31 | |||
| 32 | =head1 DESCRIPTION | ||
| 33 | |||
| 34 | This is a model class to connect C<Gedcom> files to C<Catalyst>. | ||
| 35 | |||
| 36 | =head1 METHODS | ||
| 37 | |||
| 38 | =head2 COMPONENT( ) | ||
| 39 | |||
| 40 | passes your config options to C<Gedcom>'s C<new> method. | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | 0 | ▶ | sub COMPONENT { |
|
Subroutine
COMPONENT: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 45 | 0 | my ( $class, $c, $config ) = @_; | |
| 46 | 0 | return $class->new( %$config ); | |
| 47 | } | ||
| 48 | |||
| 49 | =head1 AUTHOR | ||
| 50 | |||
| 51 | Brian Cassidy E<lt>bricas@cpan.orgE<gt> | ||
| 52 | |||
| 53 | =head1 COPYRIGHT AND LICENSE | ||
| 54 | |||
| 55 | Copyright 2005-2009 by Brian Cassidy | ||
| 56 | |||
| 57 | This library is free software; you can redistribute it and/or modify | ||
| 58 | it under the same terms as Perl itself. | ||
| 59 | |||
| 60 | =head1 SEE ALSO | ||
| 61 | |||
| 62 | =over 4 | ||
| 63 | |||
| 64 | =item * L<Catalyst> | ||
| 65 | |||
| 66 | =item * L<Gedcom> | ||
| 67 | |||
| 68 | =back | ||
| 69 | |||
| 70 | =cut | ||
| 71 | |||
| 72 | 2 | 1; | |