view Lib/Form/Transform.pm @ 63:76b878ad6596

Added serialization support for the IMPL::Object::List More intelligent Exception message Fixed encoding support in the actions Improoved tests Minor fixes
author wizard
date Mon, 15 Mar 2010 02:38:09 +0300
parents 16ada169ca75
children 76515373dac0
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;