comparison Lib/Form/Transform.pm @ 0:03e58a454b20

Создан репозитарий
author Sergey
date Tue, 14 Jul 2009 12:54:37 +0400
parents
children 16ada169ca75
comparison
equal deleted inserted replaced
-1:000000000000 0:03e58a454b20
1 package Form::Transform;
2 use strict;
3 use warnings;
4 use base qw(IMPL::Transform);
5
6 sub CTOR {
7 my ($this) = @_;
8
9 $this->superCTOR(
10 Templates => {
11 'Form::Container' => sub { my $this = shift; $this->TransformContainer(@_); },
12 'Form' => sub { my $this = shift; $this->TransformContainer(@_); }
13 },
14 Default => \&TransformItem
15 );
16 }
17
18 sub TransformContainer {
19 my ($this,$container) = @_;
20 }
21
22 sub TransformItem {
23 my ($this,$item) = @_;
24 return $item->isEmpty ? undef : $item->Value;
25 }
26
27
28
29 1;