Mercurial > pub > Impl
annotate Lib/IMPL/base.pm @ 158:a9f4ba4783eb
Minor changes
author | wizard |
---|---|
date | Tue, 02 Nov 2010 20:17:22 +0300 |
parents | e6447ad85cb4 |
children | 6ce1f052b90a |
rev | line source |
---|---|
134 | 1 package IMPL::base; |
2 use strict; | |
3 | |
4 my %loaded; | |
5 | |
6 sub import { | |
7 shift; | |
8 | |
9 no strict 'refs'; | |
10 my $class = caller; | |
11 | |
12 foreach my $baseClass (@_) { | |
13 unless ($loaded{$baseClass}) { | |
14 undef $!; | |
15 undef $@; | |
16 $loaded{$baseClass} = 1; | |
148
e6447ad85cb4
DOM objects now have a schema and schemaSource properties
wizard
parents:
134
diff
changeset
|
17 eval "require $baseClass; 1;"; |
134 | 18 |
19 die $@ if $@ and not $!; | |
20 } | |
21 | |
22 #TODO debug warn if base class is empty; | |
23 | |
24 push @{"${class}::ISA"}, $baseClass; | |
25 } | |
26 } | |
27 | |
28 1; | |
29 | |
30 __END__ | |
31 | |
32 =pod | |
33 | |
34 =head1 NAME | |
35 | |
36 C<IMPL::base> быстрая версия директивы C<base>. | |
37 | |
38 =cut |