Subject: | use utf8 fails together with Method::Signatures (aka Devel::Declare) |
Date: | Fri, 4 Dec 2020 16:15:24 +0100 |
To: | bug-Devel-Declare [...] rt.cpan.org |
From: | Konrad Bucheli <kbucheli [...] open-systems.com> |
Hi
Below script fails
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use Test::More tests => 1;
use Method::Signatures;
func echo($arg) {
return $arg;
}
is echo(42), 42, "basic func with utf8 pragma set";
with
1..1
Couldn't find declarator 'func' at
/usr/local/lib/x86_64-linux-gnu/perl/5.30.3/Devel/Declare/Context/Simple.pm
line 47.
Devel::Declare::Context::Simple::skip_declarator(Method::Signatures=HASH(0x561bc0589160))
called at /usr/local/share/perl/5.30.3/Method/Signatures.pm line 877
Method::Signatures::parser(Method::Signatures=HASH(0x561bc0589160),
"func", 0, 1) called at
/usr/local/lib/x86_64-linux-gnu/perl/5.30.3/Devel/Declare/MethodInstaller/Simple.pm
line 25
Devel::Declare::MethodInstaller::Simple::__ANON__("func", 0)
called at /usr/local/lib/x86_64-linux-gnu/perl/5.30.3/Devel/Declare.pm
line 277
Devel::Declare::linestr_callback("const", "func", 0) called at
t/utf8_func.t line 11
# Looks like your test exited with 255 before it could output anything.
but it is fine without the 'use utf8'.
Message body not shown because it is not plain text.