Skip Menu |

This queue is for tickets about the Tangram CPAN distribution.

Report information
The Basics
Id: 22532
Status: resolved
Priority: 0/
Queue: Tangram

People
Owner: Nobody in particular
Requestors: nomad [...] null.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Improved TRACE output for '0'/NULL values
Date: Tue, 24 Oct 2006 09:54:21 +0200 (CEST)
To: bug-Tangram [...] rt.cpan.org
From: Mark Lawrence <nomad [...] null.net>
The included patch (against 2.10) turns the following TRACE fragment: /* (5, 8, 1161675737, 1161675737, NULL, 6, 0005, NULL, NULL, en) */ into this: /* (5, 8, 1161675737, 1161675737, 0, 6, 0005, NULL, NULL, en) */ Ie it correctly displays the values that are '0' instead of showing them as 'NULL'. --- lib/Tangram/Storage.pm 2006-03-29 07:05:28.000000000 +0200 +++ /tmp/Tangram-2.10/lib/Tangram/Storage.pm 2006-10-24 09:47:07.000000000 +0200 @@ -674,7 +674,7 @@ my @sql = $engine->get_insert_statements($class); printf $Tangram::TRACE ">-\n%s\n".(@{$fields[$i]}?"-- with:\n /* (%s) */\n":"%s")."...\n", $sql[$i], - join(', ', map { $_ || 'NULL' } @state[ @{ $fields[$i] } ] ) + join(', ', map { defined($_) ? $_ : 'NULL' } @state[ @{ $fields[$i] } ] ) } my $sth = $sths->[$i]; @@ -752,7 +752,7 @@ my @sql = $engine->get_update_statements($class); printf $Tangram::TRACE ">-\n%s\n-- with\n /* (%s) */\n...\n", $sql[$i], - join(', ', map { $_ || 'NULL' } @state[ @{ $fields[$i] } ] ) + join(', ', map { defined($_) ? $_ : 'NULL' } @state[ @{ $fields[$i] } ] ) } my $sth = $sths->[$i]; -- Mark Lawrence http://nomad.rekudos.net/
From: SAMV [...] cpan.org
This feature was already included in the git version. Well, it half was. For inserts. http://www.utsl.gen.nz/gitweb/?p=Tangram;a=commitdiff;h=7a2a0f;hp=fb7f2e This patch has been added to master... http://www.utsl.gen.nz/gitweb/?p=Tangram;a=commitdiff;h=b93070;hp=e4c6ca
fixed on git master.