annotate Lib/IMPL/Class/Member.pm @ 35:f25d021780b3

DOM::Navigator::Builder working version
author Sergey
date Tue, 17 Nov 2009 17:46:24 +0300
parents 03e58a454b20
children 16ada169ca75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
1 package IMPL::Class::Member;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
2 use strict;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
3 use base qw(Exporter);
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
4 our @EXPORT = qw(virtual public private protected);
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
5
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
6 use IMPL::Class::Meta;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
7 require IMPL::Class::MemberInfo;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
8
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
9 use constant {
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
10 MOD_PUBLIC => 1,
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
11 MOD_PROTECTED => 2,
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
12 MOD_PRIVATE => 3
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
13 };
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
14
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
15 sub virtual($) {
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
16 $_[0]->Virtual(1);
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
17 $_[0];
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
18 }
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
19
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
20 sub public($) {
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
21 $_[0]->Access(MOD_PUBLIC);
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
22 $_[0]->Implement;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
23 $_[0];
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
24 }
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
25
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
26 sub private($) {
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
27 $_[0]->Access(MOD_PRIVATE);
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
28 $_[0]->Implement;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
29 $_[0];
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
30 }
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
31
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
32 sub protected($) {
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
33 $_[0]->Access(MOD_PROTECTED);
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
34 $_[0]->Implement;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
35 $_[0];
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
36 }
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
37 1;