Object::Relation::Setup

Object::Relation::Setup module can set up a Object::Relation Data Store.
Download

Object::Relation::Setup Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Kineticode, Inc.
  • Publisher web site:
  • http://search.cpan.org/~dwheeler/Object-Relation-v0.1.0/lib/Object/Relation/Setup/DB/SQLite.pm

Object::Relation::Setup Tags


Object::Relation::Setup Description

Object::Relation::Setup module can set up a Object::Relation Data Store. Object::Relation::Setup module can set up a Object::Relation Data Store.Synopsis use Object::Relation::Setup; my $setup = Object::Relation::Setup->new(%params); $setup->setup;This module is the base class for classes that set up a Object::Relation::Handle data store.Class InterfaceConstructorsnew my $setup = Object::Relation::Setup->new(%params);This factory constructor creates and returns a new setup object. By default, it accepts the following parameters:classDetermines which subclass of Object::Relation::Setup to use. The class can be specified as a full class name, such as Object::Relation::Setup::DB::Pg, or if it's in the Object::Relation::Setup namespace, you can just use the remainder of the class name, e.g., DB::Pg. Once Object::Relation::Setup has loaded the subclass, it will redispatch to its new() constructor. The class parameter defaults to DB::SQLite unless the constructor is called directly on the subclass, in which case that class will be used.class_dirsAn array refererence of the classes to search for classes that inherit from Object::Relation::Base. These will be passed to the load_classes method of Object::Relation::Schema; as such, the final value in the list may optionally be a File::Find::Rule object. Defaults to if not specified.verboseA boolean value indicating whether or not the setup should be verbose.Class Methodsschema_class my $schema_class = Object::Relation::Setup->schema_classReturns the name of the Object::Relation::Schema subclass that can be used to generate the schema code to build the data store. By default, this method returns the same name as the name of the Object::Relation::Setup subclass, but with "Store" replaced with "Schema".store_class my $store_class = Object::Relation::Setup->store_classReturns the name of the Object::Relation::Handle subclass that manages the interface to the data store for Object::Relation applications. By default, this method returns the same name as the name of the Object::Relation::Setup subclass, but with "Build" removed.Instance InterfaceInstance Accessorsverbose my $verbose = $setup->verbose; $setup->verbose($verbose);A boolean value idicating whether or not the setup should be verbose.class_dirs my @dirs = $setup->class_dirs; $setup->class_dirs(@dirs);Gets or sets the list of directories that will be searched for classes that inherit from Object::Relation::Base. These will be passed to the load_classes method of Object::Relation::Schema; as such, the final value in the list may optionally be a File::Find::Rule object.Instance Methodssetup $setup->setup;Sets up the data store. This is an abstract method that must be overridden in the subclasses.load_schema $setup->load_schema;Loads a Object::Relation::Schema object with all of the libraries found in the path specified by the class_dirs attribute.Why? This loads an all of the libraries in an already installed Object::Relation platform, including, of course, the Object::Relation system classes. Then a complete database can be built including the system classes and the application classes. That's really only useful for tests, though.notify $setup->nofify('Looking good...', $/);Outputs setup notification messages. It simply prints all messages to if the verbose attribute is true. Requirements: · Perl


Object::Relation::Setup Related Software