in reply to Data::FormValidator question
or...field_filters => { my_filter => [ \&MyFilter ], },
Or, as a variation on the latter one:field_filters => { my_filters => [ sub { ...code here... } ], },
The first one is great if you have a named sub to pass in anyway. But I like the second one since I'm creating a sub solely for passing around as an argument like this anyway.field_filters => { my_filters => [ sub { MyFilter(@_) } ], },
|
|---|