SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Class-Tangram rpm build for : openSUSE Leap 42. For other distributions click perl-Class-Tangram.

Name : perl-Class-Tangram
Version : 1.57 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : 3.1 Date : 2017-06-19 22:41:28
Group : Development/Libraries/Perl Source RPM : perl-Class-Tangram-1.57-3.1.src.rpm
Size : 0.13 MB
Packager : (none)
Summary : Tangram-friendly classes, DWIM attributes
Description :
Class::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 the SEE ALSO manpage) and detailed in the
Tangram::Schema manpage, 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).

Your object should use Class::Tangram as a base class;

use base qw(Class::Tangram)

or for older versions of perl:

use Class::Tangram;
use vars qw(AATTISA);
AATTISA = qw(Class::Tangram)

You should then define a \'$fields\' variable in the scope of the package,
that is a *hash* from attribute *types* (see the Tangram::Type manpage) to
either an *array* of *attribute names*, or another *hash* from *attribute
names* to *options hashes* (or \'undef\'). The layout of this structure
coincides exactly with the \'fields\' portion of a tangram schema (see the
Tangram::Schema manpage), though there are some extra options available.

This will hereon in be referred to as the `object schema\' or just `schema\'.

For example,

package Orange;
use base qw(Class::Tangram);

our $fields = {
int => {
juiciness => undef,
segments => {




check_func => sub {
die \"too many segments\"
if (${(shift)} > 30);
},

init_default => 7,
},
},
ref => {
grower => {
},
},



string => {


type => { required => 1 },


tag => { required => \'\' },
},



transient => [ qw(_tangible) ],
};

It is of critical importance to your sanity that you understand how
anonymous hashes and anonymous arrays work in Perl. Some additional
features are used above that have not yet been introduced, but you should
be able to look at the above data structure and see that it satisfies the
conditions stated in the paragraph before it. If it is hazy, I recommend
reading the perlref manpage or the perlreftut manpage.

When the schema for the object is first imported (see the Schema import
manpage), Class::Tangram defines accessor functions for each of the
attributes defined in the schema. These accessor functions are then
available as \'$object->function\' on created objects. By virtue of
inheritance, various other methods are available.

From Class::Tangram 1.12 onwards, perl\'s \'AUTOLOAD\' feature is not used to
implement accessors; closures are compiled when the class is first used.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/openSUSE_Leap_42.3/noarch

Content of RPM  Changelog  Provides Requires

Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server

Provides :
perl(Class::Tangram)
perl(Class::Tangram::Generator)
perl(Tangram::Transient)
perl-Class-Tangram

Requires :
perl(:MODULE_COMPAT_5.18.2)
rpmlib(CompressedFileNames) <= 3.0.4-1
perl(Test::Simple) => 0.18
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
perl(Date::Manip) => 5.21
rpmlib(PayloadIsLzma) <= 4.4.6-1
perl(Set::Object) => 1.04


Content of RPM :
/usr/lib/perl5/vendor_perl/5.18.2/Class
/usr/lib/perl5/vendor_perl/5.18.2/Class/Tangram
/usr/lib/perl5/vendor_perl/5.18.2/Class/Tangram.pm
/usr/lib/perl5/vendor_perl/5.18.2/Class/Tangram/Containers.pod
/usr/lib/perl5/vendor_perl/5.18.2/Class/Tangram/Generator
/usr/lib/perl5/vendor_perl/5.18.2/Class/Tangram/Generator.pm
/usr/lib/perl5/vendor_perl/5.18.2/Class/Tangram/Generator/Stub.pm
/usr/lib/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Class-Tangram
/usr/share/doc/packages/perl-Class-Tangram/Changes
/usr/share/doc/packages/perl-Class-Tangram/README
/usr/share/man/man3/Class::Tangram.3pm.gz
/usr/share/man/man3/Class::Tangram::Containers.3pm.gz
/usr/share/man/man3/Class::Tangram::Generator.3pm.gz

 
ICM