Skip to content
shootnix edited this page Dec 16, 2011 · 9 revisions

NAME

Mojolicious::Plugin::AnyData

VERSION

version 1.0

DESCRIPTION

Mojolicious::Plugin::AnyData — using your perl-data in memory like a database source.

SYNOPSIS

use Mojolicious::Plugin::AnyData

sub startup {
        my $self = shift;
        
        $self->plugin(any_data => {
            load_data => {
            cars => [
                    ['id', 'model'],
                    [ 1, 'Honda'], ],
                },
            },
            helper => 'dbh',
        });
        
        # ... or
        $self->plugin(any_data => {
            func => ['cars', 'XML', 'cars.xml', 'ad_import'],
        });
}

CONFIGURATION

There is no need to required option, you can load data in every moment in your code, and helper turns to default value 'dbh' if not specified.

You can change DBD::AnyData instance to your production database handler, just by changing a development mode to production in your project:

app->mode('production');

METHOD/HELPERS

A helper will be created with your specified name or 'dbh' by default.

SEE ALSO

Mojolicious, DBI, DBD::AnyData

AUTHOR

Alexander Ponomarev, <shootnix@gmail.com>

BUGS/CONTRIBUTING

Please report any bugs or feature requests to through the web interface at https://github.com/shootnix/Mojolicious-Plugin-AnyData/issues. If you want to contribute changes or otherwise involve yourself in development, feel free to fork the Git repository from https://github.com/shootnix/Mojolicious-Plugin-AnyData/.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 11:

Non-ASCII character seen before =encoding in '—'. Assuming UTF-8

Clone this wiki locally