CGI::Ex::Recipes::DBIx - Our minimal model!


CGI-Ex-Recipes documentation  | view source Contained in the CGI-Ex-Recipes distribution.

Index


NAME

Top

CGI::Ex::Recipes::DBIx - Our minimal model!

VERSION

Top

Version 0.02

SYNOPSIS

Top

    #in CGI::Ex::Recipes
    use CGI::Ex::Recipes::DBIx qw(dbh create_tables);
    #..then somewhere in the application
    my $recipes = $self->dbh->selectall_arrayref('select * from recipes',{ Slice => {}})
    #or in some template
    [% app.dbh.ping() %]

DESCRIPTION

Top

This class does not use or tries to mimic, or be like any of the powerfull objects-relational mappers on CPAN. It is here just to encourage you to go and use whatever you wish. If you look at the code, you will see how, if you want something more, you have to write more mixture of SQL and perl. And this is just one of the motivations of various DBIx* modules to exist.

EXPORT_OK

Top

dbh

Exports it to be used by the application and templates.

    my $recipes = $self->dbh->selectall_arrrayref('select * from recipes');

in templates

    [% app.dbh.selectall_arrrayref('select * from recipes') %]

create_tables

Creates the only table in the database. This method is executed only if the database is empty. on the very first connect.

METHODS

Top

Returns the SQL::Abstract object foreach SQL generation

categories

Returns all records in the recipes table as arrays of hashes which are categories (can hold other recipes).

recipes

This method is more general than categories. returns all recipes with given pid||0.

AUTHOR

Top

Красимир Беров, <k.berov at gmail.com>

BUGS

Top

Not known

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc CGI::Ex::Recipes::DBIx

ACKNOWLEDGEMENTS

Top

    Larry Wall - for Perl

    Paul Seamons - for all his modules and especially for CGI::Ex didtro

    Anyone which published anything on CPAN

COPYRIGHT & LICENSE

Top


CGI-Ex-Recipes documentation  | view source Contained in the CGI-Ex-Recipes distribution.