Discussion:
[jifty-devel] Die on Missing Template?
David E. Wheeler
2009-10-30 04:09:55 UTC
Permalink
Howdy,

Any reason not to apply this patch (plus test updates)? I can't
imagine a situation in which I'd want things to continue when I tried
to execute a template that wasn't there.

--- a/lib/Template/Declare/Tags.pm
+++ b/lib/Template/Declare/Tags.pm
@@ -866,8 +866,7 @@ sub _show_template {
unless ($callable) {
my $msg = "The template '$template' could not be found";
$msg .= " (it might be private)" if !$inside_template;
- carp $msg;
- return '';
+ croak $msg;
}

if (my $instrumentation = Template::Declare->around_template) {

Best,

David
Jesse Vincent
2009-10-30 04:35:36 UTC
Permalink
Post by David E. Wheeler
Howdy,
Any reason not to apply this patch (plus test updates)? I can't
imagine a situation in which I'd want things to continue when I tried
to execute a template that wasn't there.
(David and I talked about this on IRC. Short version is "I'm thrilled to
see this become configurable, but please don't break my default
semantics, which I use today")
Post by David E. Wheeler
--- a/lib/Template/Declare/Tags.pm
+++ b/lib/Template/Declare/Tags.pm
@@ -866,8 +866,7 @@ sub _show_template {
unless ($callable) {
my $msg = "The template '$template' could not be found";
$msg .= " (it might be private)" if !$inside_template;
- carp $msg;
- return '';
+ croak $msg;
}
if (my $instrumentation = Template::Declare->around_template) {
Best,
David
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
--
David E. Wheeler
2009-10-30 05:21:58 UTC
Permalink
Post by Jesse Vincent
(David and I talked about this on IRC. Short version is "I'm
thrilled to
see this become configurable, but please don't break my default
semantics, which I use today")
Can we deprecate them? The warning is…unfortunate.

Best,

David
David E. Wheeler
2009-10-30 05:26:14 UTC
Permalink
Post by David E. Wheeler
Can we deprecate them? The warning is…unfortunate.
BTW, I [blogged](http://justatheory.com/computers/programming/perl/modules/template-declare-documented.html
) Template::Declare 0.41. Thanks for everyone's patience with me.
Hopefully less will be needed in the future. :-)

David
Jesse Vincent
2009-10-30 18:42:22 UTC
Permalink
Post by David E. Wheeler
BTW, I [blogged](http://justatheory.com/computers/programming/perl/modules/template-declare-documented.html
) Template::Declare 0.41. Thanks for everyone's patience with me.
Hopefully less will be needed in the future. :-)
Thanks! Excellent article.

-j
David E. Wheeler
2009-10-31 19:27:35 UTC
Permalink
Post by Jesse Vincent
(David and I talked about this on IRC. Short version is "I'm
thrilled to
see this become configurable, but please don't break my default
semantics, which I use today")
[Done](http://github.com/theory/template-declare/commit/b015b8af57a88e079a5985b96f4e6aac67d4cf50
).

David

Loading...