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;
use Test::Fatal;

use MooseX::AttributeShortcuts ();

{ package TestClass; }

my $dies = exception { MooseX::AttributeShortcuts->init_meta(for_class => 'foo') };

like
    $dies,
    qr/Class foo has no metaclass!/,
    'init_meta() dies on no-metaclass',
    ;

done_testing;