Pithub icon indicating copy to clipboard operation
Pithub copied to clipboard

Fix POD syntax errors from misplaced =for Pod::Coverage directives

Open Copilot opened this issue 4 months ago • 0 comments

The =for Pod::Coverage directives were inside =over/=back blocks, causing perldoc to emit "=item has no contents" warnings and misrendering the documentation on CPAN.

Changes

  • Moved four =for Pod::Coverage directives outside their enclosing list blocks in lib/Pithub/Base.pm:
    • has_jsonp_callback
    • has_per_page
    • has_repo
    • has_user

The =for directive must be at document scope, not nested within list structures. Before:

=over
=item *
B<clear_per_page>: reset the per_page attribute
=item *
=for Pod::Coverage has_per_page
B<has_per_page>: check if the per_page attribute is set
=back

After:

=over
=item *
B<clear_per_page>: reset the per_page attribute
=item *
B<has_per_page>: check if the per_page attribute is set
=back

=for Pod::Coverage has_per_page
Original prompt

This section details on the original issue you should resolve

<issue_title>Problem with POD generation</issue_title> <issue_description>The generated POD in the tarball on CPAN for Pithub::Base has some issues. perldoc complains about missing and additional =backs. What seems to happen is that the sections marked with =for Pod::Coverage in commit c4d05b1dc4b905d4c44ee0db7522237e44f4572a don't end up in their proper place but close to the very bottom of the file. This can be seen at https://metacpan.org/source/OALDERS/Pithub-0.01034/lib/Pithub/Base.pm </issue_description>

Comments on the Issue (you are @copilot in this section)

@oalders @gregoa thanks for this. I still haven't gotten to the root of the issue.
[12:36:47]  <oalders>	Does anyone know what I did wrong here? https://github.com/plu/Pithub/issues/209
[12:41:13]  <mst>	attempted to use a computer for something it was designed for
[12:41:39]  <oalders>	:)
[12:41:45]  <oalders>	Looks like there are Pod errors listed here https://metacpan.org/pod/Pithub::Base
[12:41:51]  <oalders>	I should have checked that first.
[12:42:45]  <mst>	I would imagine it's Pod::Weaver trying to be clever and getting confused?
[13:27:44]  <Grinnz>	you're missing several =backs at the end of lists, and =for/=back is not a thing, =for is jsut a single line, you want =begin/=end
[13:27:50]  <Grinnz>	single paragraph*
[13:28:27]  <Grinnz>	ah, thats generated, dunno then
[13:47:38]  <mst>	the original source doesn't seem wrong
[13:47:45]  <mst>	so I'm *guessing* it's dzil being clever
```</body></comment_new>
</comments>

  • Fixes plu/Pithub#209

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Oct 24 '25 20:10 Copilot