Revision history for DBIx::Class
+ - fix Schema->txn_do to not fail as a classmethod
+
0.06999_04 2006-06-29 20:18:47
- disable cdbi-t/02-Film.t warning tests under AS perl
- fixups to MySQL tests (aka "work round mysql being retarded")
sub txn_do {
my ($self, $coderef, @args) = @_;
- ref $self or $self->throw_exception
- ('Cannot execute txn_do as a class method');
ref $coderef eq 'CODE' or $self->throw_exception
('$coderef must be a CODE reference');
eval {
(ref $schema)->txn_do(sub{});
};
- like($@, qr/class method/, '$self parameter check ok');
+ like($@, qr/storage/, "can't call txn_do without storage");
eval {
$schema->txn_do('');
};