projects
/
dbsrgits/DBIx-Class.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Fix Verisoned.pm to not issue queries that break down with quoting
[dbsrgits/DBIx-Class.git]
/
lib
/
DBIx
/
Class
/
Schema
/
Versioned.pm
diff --git
a/lib/DBIx/Class/Schema/Versioned.pm
b/lib/DBIx/Class/Schema/Versioned.pm
index
052f8e7
..
5a861ba
100644
(file)
--- a/
lib/DBIx/Class/Schema/Versioned.pm
+++ b/
lib/DBIx/Class/Schema/Versioned.pm
@@
-725,9
+725,12
@@
sub _source_exists
{
my ($self, $rs) = @_;
- my $c = try { $rs->search({ 1, 0 })->count };
-
- return (defined $c) ? 1 : 0;
+ return try {
+ $rs->search(\'1=0')->cursor->next;
+ 1;
+ } catch {
+ 0;
+ };
}
1;