Catalyst::Helper::Model::File - Helper for File based Models


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

Index


Code Index:

NAME

Top

Catalyst::Helper::Model::File - Helper for File based Models

SYNOPSIS

Top

  script/create.pl model Foo File [root_storage_directory]

  Where:
    Foo is the short name for the Model class being generated
    root_storage_directory is the (full) path of where to store files

TYPICAL EXAMPLES

Top

  script/myapp_create.pl model Foo File var/file_storage 




DESCRIPTION

Top

Helper for the File base storage Model

METHODS

Top

mk_compclass

SEE ALSO

Top

General Catalyst Stuff:

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

Stuff related to this Model:

Catalyst::Model::File

AUTHOR

Top

Ash Berlin, ash@cpan.org

LICENSE

Top

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.


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

use strict;
use warnings;
use Carp;

sub mk_compclass {
    my ( $self, $helper, $path) = @_;

    $helper->{root_dir} = $path or die "root_dir config option must be specified for this model\n";

    my $file = $helper->{file};
    $helper->render_file( 'compclass', $file );
}

1;

__DATA__

1;