On 5 May 2010 00:12, Daniel Hilton <[email protected]> wrote:
> Hello,
>
> I've just begun using HTML::FormFu, and have some suggestions for
> default_args.  I'd like to be able to apply defaults to any base
> class, not just the actual blessed name of the object.

Thanks, I've applied this in svn.

I made a slight change, so that it doesn't require Class::ISA, and
made handle_defaults() more efficient.

Rather than iterating through the objects ISA, then checking for a
match in the default_args data, I swapped it round, so we iterate
through the default_args data, then check for a match using
$object->isa()

I've also added support for the old, non-derived behaviour - you just
need to prefix the type with '+'.
e.g.:
    default_args:
        elements:
            +Block:
                auto_id: '%n'

This'll be included in the next cpan release.

Cheers,
Carl

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

Reply via email to