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