The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/perl -w

package Foo;

use strict;
use warnings;

use Method::Signatures;
use Test::More 'no_plan';

# The problem goes away inside an eval STRING.
method foo(
    $arg
)
{
    return $arg;
}

is $@, '';
is( Foo->foo(42), 42 );