Mercurial > pub > Impl
annotate Lib/IMPL/base.pm @ 156:8638dd1374bf
Added template property to IMPL::Web::QueryHandler::PageFormat (this allows to specify exact template (filename, ref to a scalar, ref to a file handle)).
author | wizard |
---|---|
date | Tue, 05 Oct 2010 17:20:51 +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 |