(Humanity could use that)
@@ -124,7 +124,9 @@ sub mkbody {
my $type = shift;
my $purpose = shift;
my $tmpl = "";
- $tmpl .= $templates->{$type}->{$purpose} if exists $templates->{$type};
+ $tmpl .= $templates->{$type}->{$purpose}
+ if exists $templates->{$type}
+ and exists $templates->{$type}->{$purpose};
return sprintf "#!%s\n%s\n", $bangs->{$type}, $tmpl;
}