annotate Lib/IMPL/Class/Member.pm @ 276:8a5da17d7ef9

*IMPL::Class refactoring property definition mechanism (incomplete).
author sergey
date Thu, 31 Jan 2013 17:37:44 +0400
parents 6253872024a4
children 6585464c4664
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
1 package IMPL::Class::Member;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
2 use strict;
165
76515373dac0 Added Class::Template,
wizard
parents: 49
diff changeset
3 use parent qw(Exporter);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
4 our @EXPORT = qw(virtual public private protected);
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
5
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
6
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
7 use IMPL::Const qw(:access);
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
8
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
9 use IMPL::Class::Meta;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
10 require IMPL::Class::MemberInfo;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
11
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
12 sub public($) {
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
13 my $info = shift;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
14 $info->{access} = ACCESS_PUBLIC;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
15 my ($class,$implementor) = delete $info->{'class','-implementor'};
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
16 $class->$implementor($info);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
17 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
18
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
19 sub private($) {
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
20 my $info = shift;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
21 $info->{access} = ACCESS_PRIVATE;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
22 my ($class,$implementor) = delete $info->{'class','-implementor'};
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
23 $class->$implementor($info);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
24 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
25
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
26 sub protected($) {
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
27 my $info = shift;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
28 $info->{access} = ACCESS_PROTECTED;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
29 my ($class,$implementor) = delete $info->{'class','-implementor'};
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
30 $class->$implementor($info);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
31 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
32 1;