Hi Carl!

Me again. ;-)

> However, I've now changed element() so it does a shallow clone ( using
> $hashref = {%$hashref} ) instead of dclone().
> This avoids the immediate butchering by element(). Whether this has
> any unwanted side-effects further down the line, we'll just have to
> wait and see.

As arleady noted, this works perfectly for single elements. However, I
now discovered that something like this:

my $empty_to_undef = sub {
    [...]
};

[...]
    element_defaults => {
        Text    => {
            transformers => [{
                type        => 'Callback',
                callback    => $empty_to_undef,
            }],
        }
    },
[...]

triggers the:

Can't store CODE items at 
/u/www/cheiron/cryo/Cryo/script/../lib/HTML/FormFu/ObjectUtil.pm line 108.

error as before. It seems that coderefs are accepted if I place constraints
or transformers or whatever inside single elements, but not if I place
them as element_defaults.

Thanks,
Michele.

-- 
Michele Beltrase
http://www.cattlegrid.info/
ICQ 76660101 - MSN [EMAIL PROTECTED]

_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to