annotate Lib/IMPL/ORM/Schema/Relation/Subclass.pm @ 32:56cef8e3cda6

+1
author Sergey
date Mon, 09 Nov 2009 01:39:31 +0300
parents dd4d72600c69
children 16ada169ca75
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 = (
30
dd4d72600c69 ORM in works
Sergey
parents: 28
diff changeset
13 'IMPL::ORM::Schema::Relation' => sub { 'Subclass' }
28
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;