Test-More / Test-More/test-more
Test2::Compare::Custom documentation
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 149
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
The documentation for Test2::Compare::Custom seems to suggest that arguments are passed in as a list:
https://metacpan.org/pod/Test2::Compare::Custom#ARGUMENTS
code => sub { my ($got, $exists, $operator, $name) = @_; return ref($got) ? 1 : 0;},
--
But they seem to being passed in as key/value pairs:
https://metacpan.org/source/EXODIST/Test2-Suite-0.000072/lib/Test2/Compare/Custom.pm#L32
When I treated the arguments as list/value pairs, my code worked:
my $url_check = Test2::Compare::Custom->new(
name => 'UrlCheck',
code => sub {
# this seems to be different from the
# documentation?
my %args = @_;
my $url = URI->new($args{got});
return 0 unless $url->scheme eq 'file'
&& $url->host eq 'localhost'
&& $url->path eq $example1;
1;
},
);
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 with the Test2::Compare::Custom documentation at the metacpan ARGUMENTS section and compare it with lib/Test2/Compare/Custom.pm around line 32. Confirm how the callback arguments are passed, then update the documentation and verify that the example reflects the actual behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100