annotate Lib/IMPL/DOM/Transform.pm @ 204:d63f9a92d6d4

+IMPL::Config::Include - simple way to include external config *IMPL::Web::Handler::TTView - finished template selecting mechanism (not tested)
author sergey
date Wed, 02 May 2012 17:42:47 +0400
parents d1676be8afcc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
1 package IMPL::DOM::Transform;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
2 use strict;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
3 use warnings;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
4
166
4267a2ac3d46 Added Class::Template,
wizard
parents: 148
diff changeset
5 use parent qw(IMPL::Transform);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
6
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
7 __PACKAGE__->PassThroughArgs;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
8
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
9 sub GetClassForObject {
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
10 my ($this,$object) = @_;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
11
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
12 if (my $class = ref $object) {
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
13 if (UNIVERSAL::isa($object,'IMPL::DOM::Node')) {
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
14 return $object->nodeName;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
15 } else {
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
16 return $class;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
17 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
18 } else {
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
19 return undef;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
20 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
21 }
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
22
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
23 1;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
24
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
25 __END__
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
26
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
27 =pod
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
28
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
29 =head1 DESCRIPTION
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
30
180
d1676be8afcc Перекодировка в utf-8
sourcer
parents: 166
diff changeset
31 Преобразование для DOM документа, использует имя узла для применения подходящего преобразования.
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
32
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 38
diff changeset
33 =cut