The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
use strict;
use warnings;
use Test::More;

BEGIN { delete $ENV{ANY_MOOSE} }

BEGIN {
    eval 'use Moose ()';
    plan skip_all => "Moose unavailable: $@" if $@;
    plan tests => 2;
}

{
    package My::Package;
    no warnings 'deprecated';
    use Any::Moose '::Util::TypeConstraints' => [qw(type)];

    ::ok defined(&type);

    no Any::Moose '::Util::TypeConstraints';
}

ok !My::Package->can('type');