annotate Lib/IMPL/Object/Fields.pm @ 168:6148f89bb7bf

IMPL::SQL::Schema::Traits::Diff alfa version IMPL::lang added hash traits
author sourcer
date Mon, 16 May 2011 04:30:38 +0400
parents 4267a2ac3d46
children d1676be8afcc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
164
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
1 package IMPL::Object::Fields;
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
2 use strict;
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
3 use warnings;
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
4
166
4267a2ac3d46 Added Class::Template,
wizard
parents: 164
diff changeset
5 use parent qw(IMPL::Object::Abstract);
164
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
6
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
7 sub new {
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
8 my $class = shift;
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
9
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
10 $class = ref $class || $class;
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
11
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
12 my $this = fields::new($class);
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
13 $this->callCTOR(@_);
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
14
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
15 return $this;
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
16 }
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
17
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
18 sub surrogate {
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
19 my $class = shift;
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
20
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
21 $class = ref $class || $class;
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
22
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
23 return fields::new($class);
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
24 }
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
25
eb3e9861a761 SQL traits in progress
wizard
parents:
diff changeset
26 1;