Test-More / Test-More/test-more
`require_ok "open"` fails
Open
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 149
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
require_ok "open" fails by trying to use the open operator.
This can be resolved by replacing
# Try to determine if we've been given a module name or file.
# Module names must be barewords, files not.
$module = qq['$module'] unless _is_module_name($module);
my $code = <<REQUIRE;
package $pack;
require $module;
1;
REQUIRE
with
# Try to determine if we've been given a module name or file.
# Module names must be barewords, files not.
my $code = ( _is_module_name($module)
? "require '$module'"
: "use $module ()"
);
$code = <<REQUIRE;
package $pack;
$code;
1;
REQUIRE
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the implementation of require_ok and reproduce the failure with the module name "open". Add regression coverage for this case, then run the relevant Perl test suite; done means require_ok "open" succeeds without invoking the open operator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100