# New Ticket Created by Rob Hoelz
# Please include the string: [perl #127089]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=127089 >
See attached files. When you run test.pl, you get the following error:
> Cannot invoke this object
> in block at /tmp/TestDist/lib/TestModule.pm line 7
> in sub guess_library_name at
> /tmp/nom/share/perl6/sources/1EBD27B0131327E04F87F2C0D2266A67ACE97B06 line 175
> in method setup at
> /tmp/nom/share/perl6/sources/1EBD27B0131327E04F87F2C0D2266A67ACE97B06 line 253
> in method CALL-ME at
> /tmp/nom/share/perl6/sources/1EBD27B0131327E04F87F2C0D2266A67ACE97B06 line 269
> in block <unit> at test.pl line 5
Moving the contents of TestModule.pm into test.pl doesn't produce the error.
Issue seems to have been introduced in 8728828.
use v6;
use NativeCall;
my sub resource-lib(Str $libname, :%RESOURCES) returns Code is export {
-> --> Str {
note('here');
die 'never made it this far';
}
}
my sub linenoiseClearScreen is native(resource-lib('linenoise')) is export { * }
use v6;
use TestModule;
linenoiseClearScreen();