From c1c903c54c605316aeaeebd2e8279964baadbe0b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 21 Feb 2014 13:12:17 -0400 Subject: [PATCH] new bug, new branch --- ...with_gettext_can_clobber___36____64__.mdwn | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn diff --git a/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn b/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn new file mode 100644 index 000000000..035346284 --- /dev/null +++ b/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn @@ -0,0 +1,22 @@ +[[!template id=gitbranch name=smcv/ready/careful-eval author="[[smcv]]"]] +[[!tag patch]] + +As noted in the Try::Tiny man page, eval/$@ can be quite awkward in +corner cases, because $@ has the same properties and problems as C's +errno. While writing a regression test for definetemplate +in which it couldn't find an appropriate template, I received + + Error: failed to process template + deftmpl + +instead of the intended + + Error: failed to process template + deftmpl template deftmpl not + found + +which turned out to be because the "catch"-analogous block called +gettext before it used $@, and gettext can call define_gettext, +which uses eval. + +Fixed in my branch smcv/ready/careful-eval. --[[smcv]] -- 2.39.5