[Jifty-commit] jifty-dbi branch, master, updated. 0.76-1-g44c54f3
Jifty commits
jifty-commit at lists.jifty.org
Sun Dec 1 12:40:18 EST 2013
The branch, master has been updated
via 44c54f36641c8f4e67414c3b4b4da9bdc918c661 (commit)
from d3d7490a8349e78296ed248f1d873376f63c7aa9 (commit)
Summary of changes:
lib/Jifty/DBI/Collection.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 44c54f36641c8f4e67414c3b4b4da9bdc918c661
Author: Brian Fraser <fraserbn at gmail.com>
Date: Sun Dec 1 12:37:08 2013 -0500
Fix for @{ eval { } } parsing under perl 5.19.4 and above
Under 5.19.4, @{ foo {"bar"} } is always parsed as @foo{bar} -- whereas
in previous version of perl, it was parsed as either that or
@{ ( foo{"bar"} ) }, depending on whenever there was a newline after the
'@{', and on whenever you were inside of an eval STRING or not.
Jifty::DBI::Collection used '@{\neval {} ...}', which under perl 5.19.4
and above parses as a syntax error. As such, explicitly mark the inside
of @{} as an expression using parens.
diff --git a/lib/Jifty/DBI/Collection.pm b/lib/Jifty/DBI/Collection.pm
index 265a747..bcfd24b 100755
--- a/lib/Jifty/DBI/Collection.pm
+++ b/lib/Jifty/DBI/Collection.pm
@@ -2210,14 +2210,14 @@ sub columns_in_db {
# TODO: memoize this
- return map lc( $_->[0] ), @{
+ return map lc( $_->[0] ), @{ (
eval {
$dbh->column_info( '', '', $table, '' )->fetchall_arrayref( [3] );
}
|| $dbh->selectall_arrayref("DESCRIBE $table;")
|| $dbh->selectall_arrayref("DESCRIBE \u$table;")
|| []
- };
+ ) };
}
=head2 has_column { table => undef, column => undef }
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list