Class::Tangram

Class::Tangram is a Perl module for tangram-friendly classes, DWIM attributes.
Download

Class::Tangram Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sam Vilain
  • Publisher web site:
  • http://search.cpan.org/~samv/

Class::Tangram Tags


Class::Tangram Description

Class::Tangram is a Perl module for tangram-friendly classes, DWIM attributes. Class::Tangram is a Perl module for tangram-friendly classes, DWIM attributes.SYNOPSIS package MyObject; use base qw(Class::Tangram); our $fields = { int => , string => }; package main; my $object = MyObject->new(foo => 2, baz => "hello"); print $object->baz(); # prints "hello" $object->set_quux("Something"); $object->set_foo("Something"); # dies - not an integerClass::Tangram is a tool for defining objects attributes. Simply define your object's fields/attributes using the same data structure introduced in _A Guided Tour of Tangram_ (see "SEE ALSO") and detailed in Tangram::Schema, and you get objects that work As You'd Expect(tm).Class::Tangram has no dependancy upon Tangram, and vice versa. Neither requires anything special of your objects, nor do they insert any special fields into your objects. This is a very important feature with innumerable benefits, and few (if any) other object persistence tools have this feature.So, fluff aside, let's run through how you use Class::Tangram to make objects.First, you decide upon the attributes your object is going to have. You might do this using UML, or you might pick an existing database table and declare each column to be an attribute (you can leave out "id"; that one is implicit; also, leave out foreign keys until later). Requirements: · Perl


Class::Tangram Related Software