annotate Lib/IMPL/ORM/Schema/Relation/Subclass.pm @ 28:6d33f75c6e1f

ORM in works
author Sergey
date Mon, 19 Oct 2009 04:13:54 +0400
parents
children dd4d72600c69
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
1 package IMPL::ORM::Schema::Relation::Subclass;
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
2 use strict;
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
3 use warnings;
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
4
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
5 use base qw(IMPL::ORM::Schema::Relation);
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
6 use IMPL::Class::Property;
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
7
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
8 BEGIN {
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
9 public property base => prop_get | owner_set;
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
10 }
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
11
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
12 our %CTOR = (
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
13 'IMPL::DOM::Node' => sub { 'Subclass' }
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
14 );
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
15
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
16 sub CTOR {
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
17 my ($this,$base) = @_;
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
18
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
19 $this->base($base) or die new IMPL::InvalidArgumentException('A base is required for this relation');
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
20 }
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
21
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
22 sub canHaveChildren {
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
23 0;
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
24 }
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
25
6d33f75c6e1f ORM in works
Sergey
parents:
diff changeset
26 1;