Skip to content

Fatalization of calling import/unimport method with argument #23623

@jkeenan

Description

@jkeenan

Per perldoc perldeprecation, we have two deprecations (actually, fatalizations) scheduled for perl-5.44 (May 2026 release). This is one of them.

=head3 Calling a missing C<import()> or C<unimport()> method with an argument

Historically calling C<import()> or C<unimport()> on any class which did
not define such a method would be silently ignored. Effectively Perl
behaved as though there was an empty method defined in the C<UNIVERSAL>
package (even when there was no such method actually defined). As of
Perl version 5.39.2 calling such a method I<with> an argument will
trigger a warning, and in Perl version 5.44 this warning will be 
upgraded to an error. (Calling such a method with no arguments at all
will always be safe.)

Category: "deprecated::missing_import_called_with_args"

This was scheduled in f1cf82e in July 2023. AFAICT we don't yet have anyone working on this, nor have we received a pull request.

Assuming we're going forward with this ... volunteers? @Leont, @ap, @leonerd (PSC) any thoughts?

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