From: Matt S Trout Date: Thu, 29 Jun 2006 22:23:54 +0000 (+0000) Subject: and fix the bloody thing X-Git-Tag: v0.07002~75^2~65 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=19630353385260225f4aa3dad8780c2aac733e08;p=dbsrgits%2FDBIx-Class.git and fix the bloody thing --- diff --git a/lib/DBIx/Class/Schema.pm b/lib/DBIx/Class/Schema.pm index 7926e92..40ba39f 100644 --- a/lib/DBIx/Class/Schema.pm +++ b/lib/DBIx/Class/Schema.pm @@ -555,6 +555,8 @@ context and it will behave as expected. sub txn_do { my ($self, $coderef, @args) = @_; + $self->storage or $self->throw_exception + ('txn_do called on $schema without storage'); ref $coderef eq 'CODE' or $self->throw_exception ('$coderef must be a CODE reference');