Skip to content

Method resolution still searches inside bareword handles despite no feature "bareword_filehandles" #19426

@leonerd

Description

@leonerd
use v5.35;
use Future;
{ use feature 'bareword_filehandles'; open Future, "<", "/dev/null"; }     
my $f = Future->done(123);

Fails with:

Name "main::Future" used only once: possible typo at - line 3.
Can't locate object method "done" via package "IO::File" at - line 4.

This indicated that, despite the no feature "bareword::filehandles" that was in scope at toplevel, it nonetheless tried to resolve the ->done method call via that bareword handle that was previously opened earlier, taking precedence over the otherwise-expected resolve via named package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions