[Jifty-commit] r5508 - jifty/trunk/lib/Jifty
Jifty commits
jifty-commit at lists.jifty.org
Sat Jun 14 14:17:30 EDT 2008
Author: audreyt
Date: Sat Jun 14 14:17:30 2008
New Revision: 5508
Modified:
jifty/trunk/lib/Jifty/Dispatcher.pm
Log:
* Jifty::Dispatcher - Two more 0-related bugs:
show(0) did not work.
set(foo => 0) and default(foo => 0) would print '' instead of 0 in debug log.
Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm Sat Jun 14 14:17:30 2008
@@ -769,7 +769,7 @@
# Fix up the path
$path = shift if (@_);
- $path ||= $self->{path};
+ $path = $self->{path} unless defined $path and length $path;
unless ($CURRENT_STAGE eq 'RUN') {
die "You can't call a 'show' rule in a 'before' or 'after' block in the dispatcher. Not showing path $path";
@@ -803,7 +803,8 @@
sub _do_set {
my ( $self, $key, $value ) = @_;
- $self->log->debug("Setting argument $key to ".($value||''));
+ no warnings 'uninitialized';
+ $self->log->debug("Setting argument $key to $value");
request->template_argument($key, $value);
}
@@ -815,7 +816,8 @@
sub _do_default {
my ( $self, $key, $value ) = @_;
- $self->log->debug("Setting argument default $key to ".($value||''));
+ no warnings 'uninitialized';
+ $self->log->debug("Setting argument default $key to $value");
request->template_argument($key, $value)
unless defined request->argument($key) or defined request->template_argument($key);
}
More information about the Jifty-commit
mailing list