Skip to content

Commit

Permalink
[November] added workaround
Browse files Browse the repository at this point in the history
For [perl #79642], which causes optional hash params to behave strangely
when not bound to anything.
  • Loading branch information
Carl Masak committed Nov 23, 2010
1 parent cab63dd commit 86acff6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/November.pm
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,9 @@ class November does November::Session does November::Cache {
self.response('list_all_pages.tmpl', %params);
}

# RAKUDO: die at hash merge if %params undef, so I use default value
method response ($tmpl, %params?={}, %opts?) {
# RAKUDO: Instead of %params? we do %params = {}, because the former
# doesn't quite work. [perl #79642]
method response ($tmpl, %params = {}, %opts = {}) {
my $template = HTML::Template.from_file($.config.template_path ~ $tmpl);

$template.with_params(
Expand Down

0 comments on commit 86acff6

Please sign in to comment.