#!/usr/bin/perl -w use strict; use warnings; use Test::More; use Set::Object; use Scalar::Util qw(refaddr); { package Foo; use Moose; __PACKAGE__->meta->make_immutable; 1; } eval 'use Test::Valgrind'; plan skip_all => 'Test::Valgrind is required to test your distribution with valgrind' if $@; { my $set = Set::Object::Weak->new; { my $obj = Foo->new; $set->insert($obj); $set->remove($obj); } }