Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 156223 Details for
Bug 242699
Requesting backport of upstream fix for DBI::PurePerl looks_like_number() and $DBI::rows.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
simplified patch derived from http://svn.perl.org/viewcvs/modules/dbi/trunk/lib/DBI/PurePerl.pm?r1=167&r2=166&pathrev=167
perl-DBI-rows-is_a_number.patch (text/plain), 2.02 KB, created by
Martin Poole
on 2007-06-05 14:19:40 UTC
(
hide
)
Description:
simplified patch derived from http://svn.perl.org/viewcvs/modules/dbi/trunk/lib/DBI/PurePerl.pm?r1=167&r2=166&pathrev=167
Filename:
MIME Type:
Creator:
Martin Poole
Created:
2007-06-05 14:19:40 UTC
Size:
2.02 KB
patch
obsolete
>--- DBI-1.40/lib/DBI/PurePerl.pm.rows_is_a_number.patch 2003-05-13 14:54:20.000000000 +0100 >+++ DBI-1.40/lib/DBI/PurePerl.pm 2007-06-05 13:40:31.000000000 +0100 >@@ -164,8 +164,8 @@ > untie $DBI::err; > untie $DBI::errstr; > untie $DBI::state; >+ untie $DBI::rows; > #tie $DBI::lasth, 'DBI::var', '!lasth'; # special case: return boolean >- #tie $DBI::rows, 'DBI::var', '&rows'; # call &rows in last used pkg > } > > sub _install_method { >@@ -482,19 +482,16 @@ > if (!defined $thing or $thing eq '') { > push @new, undef; > } >- elsif ( ($thing & ~ $thing) eq "0") { # magic from Randal >- push @new, 1; >- } > else { >- push @new, 0; >- } >+ push @new, ($thing =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/) ? 1 : 0; >+ } > } > return (@_ >1) ? @new : $new[0]; > } > sub neat { > my $v = shift; > return "undef" unless defined $v; >- return $v if looks_like_number($v); >+ return $v if (($v & ~ $v) eq "0"); # is SvNIOK > my $maxlen = shift || $DBI::neat_maxlen; > if ($maxlen && $maxlen < length($v) + 2) { > $v = substr($v,0,$maxlen-5); >@@ -672,7 +669,7 @@ > sub dbih_setup_fbav { > my $h = shift; > return $h->{'_fbav'} || do { >- $DBI::PurePerl::var->{rows} = $h->{'_rows'} = 0; >+ $DBI::rows = $h->{'_rows'} = 0; > my $fields = $h->{'NUM_OF_FIELDS'} > or DBI::croak("NUM_OF_FIELDS not set"); > my @row = (undef) x $fields; >@@ -682,14 +679,14 @@ > sub _get_fbav { > my $h = shift; > my $av = $h->{'_fbav'} ||= dbih_setup_fbav($h); >- ++$h->{'_rows'}; >+ $DBI::rows = ++$h->{'_rows'}; > return $av; > } > sub _set_fbav { > my $h = shift; > my $fbav = $h->{'_fbav'}; > if ($fbav) { >- ++$h->{'_rows'}; >+ $DBI::rows = ++$h->{'_rows'}; > } > else { > $fbav = $h->_get_fbav; >@@ -734,7 +731,7 @@ > } > sub rows { > my $h = shift; >- my $rows = $h->{'_rows'} || $DBI::PurePerl::var->{rows}; >+ my $rows = $h->{'_rows'}; > return -1 unless defined $rows; > return $rows; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 242699
: 156223 |
159786