Mercurial > pub > Impl
comparison Lib/IMPL/Web/TDocument.pm @ 75:915df8fcd16f
docs
small fixes
author | wizard |
---|---|
date | Tue, 30 Mar 2010 20:31:36 +0400 |
parents | 16ada169ca75 |
children | b1652a158b2b |
comparison
equal
deleted
inserted
replaced
74:84aa8c395fce | 75:915df8fcd16f |
---|---|
1 package IMPL::Web::TDocument; | 1 package IMPL::Web::TDocument; |
2 use strict; | 2 use strict; |
3 use warnings; | 3 use warnings; |
4 | 4 |
5 use base qw(IMPL::DOM::Node IMPL::Object::Disposable); | 5 use base qw(IMPL::DOM::Document IMPL::Object::Disposable); |
6 use Template::Context; | 6 use Template::Context; |
7 use Template::Provider; | 7 use Template::Provider; |
8 use IMPL::Class::Property; | 8 use IMPL::Class::Property; |
9 use File::Spec; | 9 use File::Spec; |
10 | 10 |
13 private property _Context => prop_all; | 13 private property _Context => prop_all; |
14 public property Template => prop_get | owner_set; | 14 public property Template => prop_get | owner_set; |
15 } | 15 } |
16 | 16 |
17 our %CTOR = ( | 17 our %CTOR = ( |
18 'IMPL::DOM::Node' => sub { nodeName => 'document' } | 18 'IMPL::DOM::Document' => sub { nodeName => 'document' } |
19 ); | 19 ); |
20 | 20 |
21 sub Provider { | 21 sub Provider { |
22 my ($this,%args) = @_; | 22 my ($this,%args) = @_; |
23 | 23 |
98 __END__ | 98 __END__ |
99 =pod | 99 =pod |
100 | 100 |
101 =head1 SYNOPSIS | 101 =head1 SYNOPSIS |
102 | 102 |
103 =begin code | |
104 | |
103 // create new document | 105 // create new document |
104 my $doc = new IMPL::Web::TDocument; | 106 my $doc = new IMPL::Web::TDocument; |
105 | 107 |
106 // load template | 108 // load template |
107 $doc->loadFile('Templates/index.tt'); | 109 $doc->loadFile('Templates/index.tt'); |
108 | 110 |
109 // render file | 111 // render file |
110 print $doc->Render(); | 112 print $doc->Render(); |
113 | |
114 =end code | |
111 | 115 |
112 =head1 DESCRIPTION | 116 =head1 DESCRIPTION |
113 | 117 |
114 Документ, основанный на шаблоне Template::Toolkit. Позволяет загрузить шаблон, | 118 Документ, основанный на шаблоне Template::Toolkit. Позволяет загрузить шаблон, |
115 и сформировать окончательный документ. Является наследником C<IMPL::DOM::Node>, | 119 и сформировать окончательный документ. Является наследником C<IMPL::DOM::Node>, |