Subject: | wish: closure interface |
Like DFV 4.0, we should leave this nasty interface behind:
transform_method => \&gen_thumb,
params => [{ w => 50, h => 50 }],
As a newer, recommended API let's use:
transform_closure => gen_thumb(w => 50, h => 50);
The gen_thumb() routine can then return a closure which works as needed. See how constraint methods work in Data::FormValidator 4+ for a reference implementation.