[Bast-commits] r8263 -
DBIx-Class/0.08/branches/connected_schema_leak/lib/SQL/Translator/Parser/DBIx
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sat Jan 9 01:10:13 GMT 2010
Author: ribasushi
Date: 2010-01-09 01:10:13 +0000 (Sat, 09 Jan 2010)
New Revision: 8263
Modified:
DBIx-Class/0.08/branches/connected_schema_leak/lib/SQL/Translator/Parser/DBIx/Class.pm
Log:
A "fix" for sqlt-related schema leaks
Modified: DBIx-Class/0.08/branches/connected_schema_leak/lib/SQL/Translator/Parser/DBIx/Class.pm
===================================================================
--- DBIx-Class/0.08/branches/connected_schema_leak/lib/SQL/Translator/Parser/DBIx/Class.pm 2010-01-09 00:37:33 UTC (rev 8262)
+++ DBIx-Class/0.08/branches/connected_schema_leak/lib/SQL/Translator/Parser/DBIx/Class.pm 2010-01-09 01:10:13 UTC (rev 8263)
@@ -15,6 +15,7 @@
use Exporter;
use SQL::Translator::Utils qw(debug normalize_name);
use Carp::Clan qw/^SQL::Translator|^DBIx::Class/;
+use Scalar::Util ();
use base qw(Exporter);
@@ -30,6 +31,10 @@
# We're working with DBIx::Class Schemas, not data streams.
# -------------------------------------------------------------------
sub parse {
+ # this is a hack to prevent schema leaks due to a retarded SQLT implementation
+ # DO NOT REMOVE
+ Scalar::Util::weaken ($_[1]);
+
my ($tr, $data) = @_;
my $args = $tr->parser_args;
my $dbicschema = $args->{'DBIx::Class::Schema'} || $args->{"DBIx::Schema"} ||$data;
More information about the Bast-commits
mailing list