use strict; use warnings; use Test::More; use Test::Exception; use Test::LeakTrace; use KiokuX::Model; my $model; eval { $model = KiokuX::Model->new(dsn => 'couchdb::uri=http://127.0.0.1:5984/lb-local'); }; plan skip_all => 'Cannot connect to CouchDB' if ($@); { no_leaks_ok { { my $scope = $model->new_scope; } } 'new_scope must not leak'; } done_testing;