Skip to content

Instantly share code, notes, and snippets.

@hatyuki
Created February 9, 2011 05:46
Show Gist options
  • Save hatyuki/817963 to your computer and use it in GitHub Desktop.
Save hatyuki/817963 to your computer and use it in GitHub Desktop.
diff --git a/lib/Teng.pm b/lib/Teng.pm
index 8a38ee0..30a3756 100644
--- a/lib/Teng.pm
+++ b/lib/Teng.pm
@@ -368,7 +368,7 @@ sub search_by_sql {
sub _guess_table_name {
my ($class, $sql) = @_;
- if ($sql =~ /\sfrom\s+([\w]+)\s*/si) {
+ if ($sql =~ /\sfrom\s+"?([\w]+)"?\s*/si) {
return $1;
}
return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment