• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bin/H30-Jan-2006-18561

inc/Module/H30-Jan-2006-613460

lib/Class/H30-Jan-2006-3,7581,977

t/H30-Jan-2006-1,7141,265

ChangesH A D30-Jan-20064.7 KiB163131

MANIFESTH A D30-Nov-2005582 2928

META.ymlH A D30-Jan-2006266 1514

Makefile.PLH A D03-May-2022570 2416

READMEH A D30-Jan-20064.6 KiB12188

README

1Class::Tangram version 1.57
2===========================
3
4Class::Tangram serves to provide a base class for objects well suited
5for storage into a Tangram SQL storage.
6
7In some ways, it is similar to Class::Contract or Class::MethodMaker -
8in that you define attributes for your class, and the module uses
9those definitions to create what are known as ``accessor'' methods -
10simply speaking, if you define class `Cheese' to have a `holes'
11attribute, then you will get two functions - `Cheese->get_holes()' and
12`Cheese->set_holes($x)'.  Also, there is a `Cheese->holes()' function
13that behaves like a get or a set, depending on how it is called.  DWIM
14is the motto.
15
16However, it allows finer-grained specification of the types of
17attributes than those other classes.  Currently the granularity is
18geared towards the assumption that you're using the SQL Tangram
19storage back-end - Tangram 2.
20
21It should be stressed that storing Class::Tangram objects in a Tangram
22storage, or ensuring that your classes in a Tangram storage are all
23derived from Class::Tangram is not required.
24
25This seperation is what makes Tangram what is known as ``orthogonal'',
26and why you can run Tangram 2 side by side with other mapping tools.
27
28If you want to know what the hell I'm rabbitting on about, first go to
29the Tangram web site at http://www.tangram-persistence.org/, and read
30the "Guided Tour" of Tangram.  It doesn't take long, and will vastly
31assist `Aha!' moments whilst reading the Class::Tangram manual page.
32
33INSTALLATION
34
35To install this module type the following:
36
37   perl Makefile.PL
38   make
39   make test
40   su root -c "make install"
41
42DEPENDENCIES
43
44This module requires Set::Object 1.04 or higher.  You may also want to
45install Tangram 2.03 or later.  Realistically, you'll want the latest
46version of Tangram - 2.07 or later is recommended.
47
48Test::Simple 0.18 and Date::Manip 0.32 are also required to run the
49test suite.
50
51UPGRADING FROM 1.13
52
53The large change in the version number represents a substantial
54enhancement to the way `collection' attributes (ref, set, array, hash)
55are treated.  See `perldoc lib/Class/Tangram/Containers.pod` for more
56information.  If you only ever use the get_* methods for these types
57of attributes in scalar context, this will not affect you.
58
59Another important change is that `intermediate' classes are now
60inserted into the inheritance tree.  Writers of ambitious code should
61be careful not to call Class::Tangram::import_schema() until your
62inheritance tree has `settled down'.
63
64The contributed module Class::Tangram::Generator is now included.
65It's worth a look!
66
67In other news, support for Perl 5.005 has finally been neglected.
68
69UPGRADING FROM 1.11
70
71The biggest change is that previously, if you wanted to override what
72happens when you get or set an attribute, you should have defined
73set() and get() functions in your derived class.  Now, you are going
74to have to define methods called get_attribute() and/or
75set_attribute().  attribute() is a virtual method that calls
76get_attribute() or set_attribute() - depending on the number of
77arguments given - so don't override that unless you understand the
78consequences.
79
80The semantics for specifying an object's fields has changed slightly;
81instead of defining $YourClass::schema, you should define
82$YourClass::fields, which should contain what
83$YourClass::schema->{fields} used to contain.  The module still looks
84in the old location, so don't fret about changing your modules too
85much :-).
86
87UPGRADING FROM 1.09
88
89There is only a very minor source incompatible change, that would
90affect people who used tied values for their init_default attribute
91options.  ie, it should not affect anyone.  e-mail me if the new
92behaviour is not what you want!
93
94UPGRADING FROM 1.07
95
96There are no backwards-incompatibile changes in this release, unless
97you have another Tangram::Type that provides the tangram type
98"transient".
99
100UPGRADING FROM 1.06
101
102Most users should be able to install the new version without problems.
103
104However, there are a few small places where slight changes could
105affect your code.
106
107   1. If you have an attribute that is an array or a flat array, and
108      you evaluate it in list context, it now returns the contents of
109      the array rather than a reference to the array.  This is keeping
110      in line with the way Set::Object attributes work.
111
112   2. If you were using the bogus "time" or "timestamp" types, you
113      will need to switch to "rawtime", "rawdatetime" or "dmdatetime".
114
115COPYRIGHT AND LICENCE
116
117Copyright (C) 2001 - 2005, Sam Vilain.  All Rights Reserved.  This
118module is free software. It may be used, redistributed and/or modified
119under the terms of the Perl Artistic License
120
121