Author: timbo
Date: Mon Sep 4 03:44:06 2006
New Revision: 6841
Modified:
dbi/trunk/Changes
dbi/trunk/DBI.xs
dbi/trunk/lib/DBI/PurePerl.pm
dbi/trunk/t/40profile.t
Log:
Tweaks that were in 1.52 but didn't get checked in
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Mon Sep 4 03:44:06 2006
@@ -6,7 +6,7 @@
XXX update docs for Profile &subname magic Path elements
-=head2 Changes in DBI 1.52 (svn rev 6734), 30h July 2006
+=head2 Changes in DBI 1.52 (svn rev 6840), 30th July 2006
Fixed memory leak (per handle) thanks to Nicholas Clark and Ephraim Dan.
Fixed memory leak (16 bytes per sth) thanks to Doru Theodor Petrescu.
Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs (original)
+++ dbi/trunk/DBI.xs Mon Sep 4 03:44:06 2006
@@ -2170,14 +2170,11 @@
sv_setpv(buf,"");
if (CopLINE(curcop)) {
COP *cop;
- char *buf_start = SvEND(buf);
dbi_caller_string(buf, curcop, prefix, suffix, show_line, show_caller,
show_path);
if (show_caller && (cop = dbi_caller_cop())) {
SV *via = sv_2mortal(newSVpv("",0));
dbi_caller_string(via, cop, prefix, suffix, show_line,
show_caller, show_path);
- if (strNE(SvPV_nolen(via), buf_start)) {
- sv_catpvf(buf, " via %s", SvPV_nolen(via));
- }
+ sv_catpvf(buf, " via %s", SvPV_nolen(via));
}
}
if (dirty)
Modified: dbi/trunk/lib/DBI/PurePerl.pm
==============================================================================
--- dbi/trunk/lib/DBI/PurePerl.pm (original)
+++ dbi/trunk/lib/DBI/PurePerl.pm Mon Sep 4 03:44:06 2006
@@ -592,8 +592,11 @@
sub neat {
my $v = shift;
return "undef" unless defined $v;
- return $v if (($v & ~ $v) eq "0"); # is SvNIOK
- my $quote = utf8::is_utf8($v) ? '"' : "'";
+ my $quote = q{"};
+ if (not utf8::is_utf8($v)) {
+ return $v if (($v & ~ $v) eq "0"); # is SvNIOK
+ $quote = q{'};
+ }
my $maxlen = shift || $DBI::neat_maxlen;
if ($maxlen && $maxlen < length($v) + 2) {
$v = substr($v,0,$maxlen-5);
Modified: dbi/trunk/t/40profile.t
==============================================================================
--- dbi/trunk/t/40profile.t (original)
+++ dbi/trunk/t/40profile.t Mon Sep 4 03:44:06 2006
@@ -232,7 +232,7 @@
#warn Dumper($tmp);
is_deeply $tmp, {
"$file" => {
- "$file" => {
+ "$file via $file" => {
"$file line $line2" => {
"$file line $line2 via $file line $line1" => [ 1, 0, 0, 0, 0, 0, 0 ]
}