View on
MetaCPAN
Guillaume Aubert > DBIx-NinjaORM > DBIx::NinjaORM::StaticClassInfo

Download:
DBIx-NinjaORM-v3.1.0.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: v3.1.0   Source  

NAME ^

DBIx::NinjaORM::StaticClassInfo - Hold the configuration information for DBIX::NinjaORM classes.

VERSION ^

Version 3.1.0

DESCRIPTION ^

This package is used to store and retrieve defaults as well as general information for a specific class. It allows for example indicating what table the objects will be related to, or what database handle to use.

Here's the full list of the options that can be set or overridden:

SYNOPSIS ^

        my $static_class_info = $class->SUPER::static_class_info();

        # Set or override information.
        $static_class_info->set(
                {
                        table_name       => 'books',
                        primary_key_name => 'book_id',
                        default_dbh      => DBI->connect(
                                "dbi:mysql:[database_name]:localhost:3306",
                                "[user]",
                                "[password]",
                        ),
                }
        );

        # Retrieve information.
        my $table_name = $static_class_info->get('table_name');

METHODS ^

new()

Create a new DBIx::NinjaORM::StaticClassInfo object.

        my $static_class_info = DBIx::NinjaORM::StaticClassInfo->new();

get()

Retrieve the value of one of the configuration variables.

        my $value = $static_class_info->get( $key );

set()

Set values for one or more configuration variables.

        $static_class_info->set(
                {
                        unique_fields    => [],
                        filtering_fields => [],
                        ...
                }
        );

BUGS ^

Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/DBIx-NinjaORM/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

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

        perldoc DBIx::NinjaORM::StaticClassInfo

You can also look for information at:

AUTHOR ^

Guillaume Aubert, <aubertg at cpan.org>.

COPYRIGHT & LICENSE ^

Copyright 2009-2017 Guillaume Aubert.

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

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for more details.

syntax highlighting: