View | Details | Raw Unified | Return to bug 191734
Collapse All | Expand All

(-)p5-DBIx-SearchBuilder/Makefile 2014-07-08 05:12:12.000000000 -0500 (+10 lines)
Lines 25-28 Link Here
25
USES=          perl5
25
USES=          perl5
26
USE_PERL5=     configure
26
USE_PERL5=     configure
27
27
28
OPTIONS_DEFINE=        PERFORMANCE
29
PERFORMANCE_DESC=      Makes ->Fields() Case-Sensitive (see man page for warnings)
30
31
.include <bsd.port.options.mk>
32
33
.if ${PORT_OPTIONS:MPERFORMANCE}
34
EXTRA_PATCHES+=        ${FILESDIR}/optionalpatch-lib__DBIx__SearchBuilder__Handle.pm \
35
               ${FILESDIR}/optionalpatch-lib__DBIx__SearchBuilder.pm
36
.endif
37
28
.include <bsd.port.mk>
38
.include <bsd.port.mk>
(-)p5-DBIx-SearchBuilder/files/optionalpatch-lib__DBIx__SearchBuilder.pm 2014-07-08 04:58:42.000000000 -0500 (+16 lines)
Line 0 Link Here
1
--- ./lib/DBIx/SearchBuilder.pm.orig   2013-07-03 18:40:21.000000000 -0500
2
+++ ./lib/DBIx/SearchBuilder.pm        2014-07-08 04:58:35.000000000 -0500
3
@@ -1785,9 +1785,11 @@
4
 
5
 =head2 Fields TABLE
6
 
7
-Return a list of fields in TABLE, lowercased.
8
+Return a list of fields in TABLE
9
 
10
-TODO: Why are they lowercased?
11
+Note: this is a FreeBSD optionally patched version and both the table 
12
+names and the field names are case-sensitive.  This could break 
13
+applications that assume everything is lowercased.
14
 
15
 =cut
16
 
(-)p5-DBIx-SearchBuilder/files/optionalpatch-lib__DBIx__SearchBuilder__Handle.pm 2014-07-08 04:58:42.000000000 -0500 (+23 lines)
Line 0 Link Here
1
--- ./lib/DBIx/SearchBuilder/Handle.pm.orig    2013-06-06 14:06:18.000000000 -0500
2
+++ ./lib/DBIx/SearchBuilder/Handle.pm 2014-07-08 04:58:05.000000000 -0500
3
@@ -1430,16 +1430,16 @@
4
     my $self  = shift;
5
     my $table = shift;
6
 
7
-    unless ( keys %FIELDS_IN_TABLE ) {
8
-        my $sth = $self->dbh->column_info( undef, '', '%', '%' )
9
+    unless ( keys %FIELDS_IN_TABLE && exists $FIELDS_IN_TABLE{$table} ) {
10
+        my $sth = $self->dbh->column_info( undef, '', $table, '%' )
11
             or return ();
12
         my $info = $sth->fetchall_arrayref({});
13
         foreach my $e ( @$info ) {
14
-            push @{ $FIELDS_IN_TABLE{ lc $e->{'TABLE_NAME'} } ||= [] }, lc $e->{'COLUMN_NAME'};
15
+            push @{ $FIELDS_IN_TABLE{ $e->{'TABLE_NAME'} } ||= [] }, $e->{'COLUMN_NAME'};
16
         }
17
     }
18
 
19
-    return @{ $FIELDS_IN_TABLE{ lc $table } || [] };
20
+    return @{ $FIELDS_IN_TABLE{ $table } || [] };
21
 }
22
 
23
 

Return to bug 191734