http://www.perlmonks.org?node_id=754340


in reply to DBIC & deploy

At which level do you want to find out? DBIx::Class::Schema::Versioned uses this construct:
sub _source_exists { my ($self, $rs) = @_; my $c = eval { $rs->search({ 1, 0 })->count; }; return 0 if $@ || !defined $c; return 1; }
This is called on a $schema object, and passed a plain $resultset object.

Or you could just use Versioned.

C.