annotate Lib/IMPL/Class/Member.pm @ 277:6585464c4664

sync (unstable)
author sergey
date Fri, 01 Feb 2013 16:37:59 +0400
parents 8a5da17d7ef9
children 4ddb27ff4a0b
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);
277
6585464c4664 sync (unstable)
sergey
parents: 276
diff changeset
4 our @EXPORT = qw(&public &private &protected);
49
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 require IMPL::Class::MemberInfo;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
10
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
11 sub public($) {
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
12 my $info = shift;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
13 $info->{access} = ACCESS_PUBLIC;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
14 my ($class,$implementor) = delete $info->{'class','-implementor'};
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
15 $class->$implementor($info);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
16 }
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 sub private($) {
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
19 my $info = shift;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
20 $info->{access} = ACCESS_PRIVATE;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
21 my ($class,$implementor) = delete $info->{'class','-implementor'};
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
22 $class->$implementor($info);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
23 }
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 sub protected($) {
276
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
26 my $info = shift;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
27 $info->{access} = ACCESS_PROTECTED;
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
28 my ($class,$implementor) = delete $info->{'class','-implementor'};
8a5da17d7ef9 *IMPL::Class refactoring property definition mechanism (incomplete).
sergey
parents: 275
diff changeset
29 $class->$implementor($info);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
30 }
277
6585464c4664 sync (unstable)
sergey
parents: 276
diff changeset
31
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
32 1;