Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

options method on Select fields receives inconsistent, undocumented arguments #130

Open
karenetheridge opened this issue Nov 2, 2016 · 0 comments

Comments

@karenetheridge
Copy link
Contributor

I just discovered a significant behaviour difference between options methods on Select fields, depending on how they are declared:

has_field foo => (
    type => 'Select',
    options_method => sub { ... },  # receives one argument: ($field)
);

has_field bar => (
    type => 'Select',
);
sub options_bar { ... }             # receives two arguments: ($form, $field)

This causes interesting failures when moving a sub from one style to the other.

It doesn't look like the documentation describes what is passed in either case.

@karenetheridge karenetheridge changed the title options method on Select fields receives inconsistent, undocument arguments options method on Select fields receives inconsistent, undocumented arguments Nov 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant