Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined import method warning with Perl 5.39.1 or newer #836

Closed
kmoradha opened this issue Dec 9, 2024 · 1 comment
Closed

Undefined import method warning with Perl 5.39.1 or newer #836

kmoradha opened this issue Dec 9, 2024 · 1 comment

Comments

@kmoradha
Copy link

kmoradha commented Dec 9, 2024

When using Perl 5.39.1 or newer, the following line generates the warning shown below:

use File::Spec qw/ tmpdir /;
Attempt to call undefined import method with arguments ("tmpdir") via package "File::Spec" (Perhaps you forgot to load the package?)

I believe this is related to this change: https://perldoc.perl.org/5.39.1/perldelta#Calling-the-import-method-of-an-unknown-package-produces-an-error

This does not cause any failure, as the tmpdir() method is later called using the proper module-qualified syntax (File::Spec->tmpdir()), but the warning can be noisy.

@darold
Copy link
Owner

darold commented Dec 10, 2024

Commit 3197881 solves this issue. Thanks!

@darold darold closed this as completed Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants