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

allow different behavior on undefs #3

Closed
rjbs opened this issue Aug 8, 2014 · 0 comments
Closed

allow different behavior on undefs #3

rjbs opened this issue Aug 8, 2014 · 0 comments

Comments

@rjbs
Copy link
Owner

rjbs commented Aug 8, 2014

What happens when you get an undef value for (say) %s or %t? Right now, it does the normal Perlish thing of converting to "" or 0. It should be possible to change this behavior, giving at least these options:

  • do what we do now, coerce
  • throw a runtime error
  • for strings, supply a placeholder to be used for undef

There is no case when a payload value can correctly be undefined right now, so we can throw as soon as we have the payload. Further, we should be able to pull, out of the format string, a mapping of parameter names to legal types. Then we could validate things much more usefully.

This todo is the result of https://rt.cpan.org/Ticket/Display.html?id=67851

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