You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucy.apache.org by nwellnhof <gi...@git.apache.org> on 2015/12/12 16:13:43 UTC
[lucy-dev] [GitHub] lucy-clownfish pull request: CLOWNFISH-64 Autogenerate Perl subrou...
GitHub user nwellnhof opened a pull request:
https://github.com/apache/lucy-clownfish/pull/49
CLOWNFISH-64 Autogenerate Perl subroutine code samples
Now the generated POD looks like
=head2 glean_query
$searcher->glean_query($query);
$searcher->glean_query(); # default: undef
[...]
=head2 hits
$searcher->hits(
query => $obj, # required
offset => $int, # default: 0
num_wanted => $int, # default: 10
sort_spec => $sort_spec, # default: undef
);
[...]
This also makes it possible to link to the POD section of a method or constructor.
Having `$int` appear multiple times in the example above might be confusing. Maybe the following more verbose format is better?
$searcher->hits(
query => $query, # Clownfish::Obj, required
offset => $offset, # integer, default: 0
num_wanted => $num_wanted, # integer, default: 10
sort_spec => $sort_spec, # Lucy::Search::SortSpec, default: undef
);
Other things that could be improved:
- Type information for positional parameters.
- Type information for return types.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nwellnhof/lucy-clownfish CLOWNFISH-64-autogenerate-code-samples
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucy-clownfish/pull/49.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #49
----
commit 5e7c5ceaa56e900417c67550fab2573598cb8eb4
Author: Nick Wellnhofer <we...@aevum.de>
Date: 2015-12-12T14:34:03Z
Autogenerate Perl subroutine code samples
Resolves CLOWNFISH-64.
commit e2626d979b25c9a8f4bb8af9d48f104cdae99aeb
Author: Nick Wellnhofer <we...@aevum.de>
Date: 2015-12-12T14:37:40Z
Remove argument summary from =head2 in POD
commit 18007a3a085fe51ebc12cd6b991770a0d6a17974
Author: Nick Wellnhofer <we...@aevum.de>
Date: 2015-12-12T14:56:31Z
Make Clownfish URIs link to relevant POD section
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[lucy-dev] [GitHub] lucy-clownfish pull request: CLOWNFISH-64 Autogenerate Perl subrou...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/lucy-clownfish/pull/49
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---