Skip to content

Syntax parsing: A lone =cut is not parsed as a POD starter #164

Description

@SineSwiper

Due to a quirk with how Perl POD gets parsed, this rule is followed to the strictest level:

A Pod block starts with any command paragraph

This includes a =cut command, when no POD block was started. For example:

sub thing_one {}

=cut

sub thing_two {}

=head1 OTHER THINGS

=cut

sub thing_three {}

The first =cut here is not considered to be a POD ender, but a POD starter, and the thing_two sub is swallowed up into the POD. This is unintuitive, but also something that P5P isn't likely going to be able to fix without breaking backwards-compatibility.

This sort of thing is highlighted correctly in Vim, but the Perl Navigator syntax colorization thinks that the lone =cut is a POD ender, so there's no indication that anything is wrong.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions