view Lib/Form/Transform.pm @ 24:7f00786f8210

Первая рабочая реазизация схемы и навигаторов
author Sergey
date Mon, 05 Oct 2009 00:48:49 +0400
parents 03e58a454b20
children 16ada169ca75
line wrap: on
line source

package Form::Transform;
use strict;
use warnings;
use base qw(IMPL::Transform);

sub CTOR {
    my ($this) = @_;
    
    $this->superCTOR(
        Templates => {
            'Form::Container' => sub { my $this = shift; $this->TransformContainer(@_); },
            'Form' => sub { my $this = shift; $this->TransformContainer(@_); }
        },
        Default => \&TransformItem
    );
}

sub TransformContainer {
    my ($this,$container) = @_;
}

sub TransformItem {
    my ($this,$item) = @_;
    return $item->isEmpty ? undef : $item->Value;
}



1;