-
Notifications
You must be signed in to change notification settings - Fork 89
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
require_ok "open"
fails
#889
Comments
Unfortunately this change could break things. There is a lot of code on cpan that overrides require, any code testing a require override using require_ok could potentially break if use does not call the override (I am not sure it would, though putting a sub in @inc should still work). This is another affirmation of the Test2 decision not to implement use_ok or require_ok. I think for back-compatibility of Test::More we should simply document this limitation and move on, the fix may be more problematic than the problem being solved. I will leave this ticket open for a while to solicit feedback from you and anyone else who wants to weigh-in on the pros and cons. If anyone has the capacity right now to look into the effects on a require-override and/or verify against a large chunk of cpan with such a change in place I would welcome that, I do not have the time at the moment. If this fix can be proven safe for back-compatibility I will consider it. |
A better approach would probably be to translate module names into "Module/Name.pm" form before requiring them. |
What is the current recommended way to do that? I usually do the naive |
|
require_ok "open"
fails by trying to use theopen
operator.This can be resolved by replacing
with
The text was updated successfully, but these errors were encountered: