Catalyst::Helper::Model::Proxy - Helper for Proxy Models


Catalyst-Model-Proxy documentation Contained in the Catalyst-Model-Proxy distribution.

Index


Code Index:

NAME

Top

Catalyst::Helper::Model::Proxy - Helper for Proxy Models

SYNOPSIS

Top

    script/create.pl model Proxy Proxy dsn user password

DESCRIPTION

Top

Helper for Proxy Model.

METHODS

mk_compclass

Reads the database and makes a main model class

mk_comptest

Makes tests for the Proxy Model.

SEE ALSO

Top

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

AUTHOR

Top

Alex Pavlovic, alex.pavlovic@taskforce-1.com

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 %] - Proxy Model Class

SYNOPSIS

Top

See [% app %]

DESCRIPTION

Top

Proxy Model Class.

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-Proxy documentation Contained in the Catalyst-Model-Proxy distribution.
package Catalyst::Helper::Model::Proxy;

use strict;
use File::Spec;

our $VERSION = '0.03';

sub mk_compclass {
	my ( $self, $helper, $target_class, $subroutines ) = @_;
	$helper->{target_class} = $target_class  || '';
	$helper->{subroutines} = $subroutines || '';
	my $file = $helper->{file};
	$helper->render_file( 'dbiclass', $file );
	return 1;
}

1;
__DATA__

__dbiclass__
package [% class %];

use strict;
use base 'Catalyst::Model::Proxy';

__PACKAGE__->config(
    target_class           => '[% target_class %]',
    subroutines            => '[ [% subroutines %] ]'
);

1;