GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
T2::Schema(3) User Contributed Perl Documentation T2::Schema(3)

T2::Schema - Tangram Schemas, suitable for putting in a Tangram Store

use T2::Schema;

my $schema = T2::Schema->load("site"); $schema->compile();

new Object();

T2::Schema->load("site"[, $source])
This is actually a constructor :-).

Load the schema for "site" and return it.

$source, if given, may be a Tangram::Storage object - in which case it is assumed to be the schema database. If missing, T2::Storage->connect() is used to obtain a handle to the schema database.

$source may also be the correct Schema object, for convenience. In this case it is returned unchanged.

This is actually a constructor :-).

Load a dumped schema for "site" and returns it. $filename, if given, may be the name of a file to use, or the site name (in which case, the file name is assumed to be etc/site.t2.

Loads all of the classes in the schema in to memory.

Tries to use on-disk versions rather than generating the in-memory object & then compiling it.

The idea is that Class::Tangram version 2 uses `Class' objects as input bread and butter rather than `schema' structures. This should eliminate the necessity for a huge `eval'.

This interface is deprecated in favour of using $schema->generator

Returns a Class::Tangram::Generator object that is valid for this Schema.

Returns the data structure that is fed into Tangram::Schema->new().

Note that Tangram performs various in-place edits of this data structure. So don't go assuming too much about it.

Generates a Tangram Schema for this Schema, or returns the one that was already generated. Use $schema->set_schema(undef) to force a re-generation of the Tangram Schema structure.

Returns the Tangram Storage class associated with this Schema. Possibly connecting to the database.

Returns the class definition for class $name.

Croaks if there is no class $name.

Returns the class definition for class $name.

Returns undef if no such class is found.

Returns the class definition for class $name.

Returns a new class if no such class is found.

add_class_from_schema($name => $schema)
Adds a Class object to this schema, gleaning information from $schema, which you perhaps found in $YourClass::schema.

Returns the classes in inheritance first order. Actually this function is pretty redundant, you can just call "sort $schema->classes", but this implementation takes a different approach.

Traverses over every object in the schema, setting $_[0] to the item.

Returns a structure of T2::Schema and related objects that represents the schema of the T2::Schema modules.

Hey! The above document had some coding errors, which are explained below:
Around line 160:
You forgot a '=back' before '=head2'
Around line 490:
'=item' outside of any '=over'
Around line 546:
You forgot a '=back' before '=head2'
2005-11-06 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.