Catalyst::Helper::Model::DBIC::Plain - Helper for DBIC Plain Model


Catalyst-Model-DBIC-Plain documentation Contained in the Catalyst-Model-DBIC-Plain distribution.

Index


Code Index:

NAME

Top

Catalyst::Helper::Model::DBIC::Plain - Helper for DBIC Plain Model

SYNOPSIS

Top

    script/create.pl model DBIC DBIC::Plain dsn user password

DESCRIPTION

Top

Helper for the DBIC Plain Model.

METHODS

mk_compclass

SEE ALSO

Top

Catalyst::Manual, Catalyst::Test, Catalyst::Request, Catalyst::Response, Catalyst::Helper

AUTHOR

Top

Danijel Milicevic, info@danijel.de

THANK YOU

Top

Andy Grundman

LICENSE

Top

This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.

NAME

Top

[% class %] - DBIC Plain Model Component

SYNOPSIS

Top

See [% app %]

DESCRIPTION

Top

DBIC Plain Model Component.

AUTHOR

Top

[% author %]

LICENSE

Top

This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.


Catalyst-Model-DBIC-Plain documentation Contained in the Catalyst-Model-DBIC-Plain distribution.
package Catalyst::Helper::Model::DBIC::Plain;

use strict;

sub mk_compclass {
    my ( $self, $helper, $dsn, $user, $pass ) = @_;
    $helper->{dsn}  = $dsn  || '';
    $helper->{user} = $user || '';
    $helper->{pass} = $pass || '';    
    my $file = $helper->{file};
    $helper->render_file( 'compclass', $file );
}

1;

__DATA__

__compclass__
package [% class %];

use strict;
use base 'Catalyst::Model::DBIC::Plain';

my @conn_info = (
    '[% dsn %]',
    '[% user %]',
    '[% pass %]',
    { RaiseError => 1, PrintError => 0, ShowErrorStatement => 1, TraceLevel => 0 }
);

__PACKAGE__->load_classes;
__PACKAGE__->compose_connection( __PACKAGE__, @conn_info );

1;