-
Notifications
You must be signed in to change notification settings - Fork 605
make calling an undefined import method a warning #24059
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
base: blead
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,3 +25,13 @@ my $a = bless [] ; | |
| UNIVERSAL::isa $a, Jim ; | ||
| EXPECT | ||
| Can't locate package Joe for @Y::ISA at - line 8. | ||
| ######## | ||
| use warnings 'undef_import'; | ||
| Some::Package->import("bar"); | ||
| EXPECT | ||
| Attempt to call undefined import method with arguments ("bar") via package "Some::Package" (Perhaps you forgot to load the package?) at - line 2. | ||
| ######## | ||
| use warnings 'undef_import'; | ||
| Some::Package->unimport(1.234); | ||
| EXPECT | ||
| Attempt to call undefined unimport method with arguments ("1.234") via package "Some::Package" (Perhaps you forgot to load the package?) at - line 2. | ||
|
Comment on lines
+28
to
+37
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't test that the warning is enabled by default. Or that disabling it works. |
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.