Mercurial > pub > Impl
annotate Lib/IMPL/base.pm @ 151:e36ffd8c29db
Fixed major bug in conversion from a POST request to the DOM document (when instanceId == 0)
minor fixes
author | wizard |
---|---|
date | Fri, 20 Aug 2010 16:33:37 +0400 |
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 |