[Catalyst] debug output parameter bug?

Andy Grundman andy at hybridized.org
Fri Jan 6 19:26:14 CET 2006


Chisel Wright wrote:
> [Fri Jan  6 16:46:50 2006] [catalyst] [debug] Query Parameters are:
> .---------------------------+--------------------------.
> | Key                       | Value                    |
> +---------------------------+--------------------------+
> | mykey                     |                          |
> '---------------------------+--------------------------'

Looks like a bug in Text::SimpleTable.  Thanks, here's the patch which we'll put 
in the next release, or at least something similar. :)

--- lib/Text/SimpleTable.pm     (revision 2951)
+++ lib/Text/SimpleTable.pm     (working copy)
@@ -201,7 +201,8 @@
          for my $j ( 0 .. $columns ) {
              my $column = $self->{columns}->[$j];
              my $width  = $column->[0];
-            my $text   = $column->[1]->[$i] || '';
+            my $text
+                = ( defined $column->[1]->[$i] ) ? $column->[1]->[$i] : '';
              $text = sprintf "%-${width}s", $text;
              if ( ( $j == 0 ) && ( $columns == 0 ) ) {
                  $text = "$LEFT_BORDER$text$RIGHT_BORDER";
@@ -242,7 +243,7 @@
              $subtext = substr $part, 0, $width - length($WRAP), '';
              push @cache, "$subtext$WRAP";
          }
-        push @cache, $part if $part;
+        push @cache, $part if defined $part;
      }
      return \@cache;
  }



More information about the Catalyst mailing list