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 tests => 2;

use MooseX::Method::Signatures;

my $foo = 'bar';

method "$foo" ($class:) { $foo }

my $meth = __PACKAGE__->can($foo);
ok($meth);
is(__PACKAGE__->$meth, $foo);