Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of POD formatting is lost #47

Open
pmorch opened this issue Jan 11, 2017 · 1 comment
Open

Lots of POD formatting is lost #47

pmorch opened this issue Jan 11, 2017 · 1 comment
Assignees
Labels

Comments

@pmorch
Copy link

pmorch commented Jan 11, 2017

Thank you for this module. So far it is the best I've seen for this purpose. I'll be using it.

I've noticed that when I write POD for documentation, a lot of the formatting is lost. It is especially painful that all =head2 Heading String lines seem not to be shown at all. That is a shame, because what makes MooseX-App stand out is its ability to use POD for documentation strings to create rich documentation and it would be nice if one could use all of POD for creating documentation.

Is there anything I can do?

Pod in MyApp::Foo:

=head1 NAME

foo - do something wonderful

=head1 USAGE

Usage for foo

With additional B<bold> I<italic> and C<code> text

=head1 DESCRIPTION

Foo description

    With B<bold> that should be rendered as-is because of indentation

=head2 Subheading 2

Text for subheading 2

There are these things to consider:

=over 4

=item temperature

Temperature

=item price of pigs in New Zealand

I'm sure that matters too, somehow

=back

=cut

This is what it looks like with perldoc:

perldoc

And this is what it looks like with ./mooseapp.pl foo --help:

usage

Note especially how the "Subheading 2" string is simply omitted altogether

pod2text MyApp/Foo.pm shows this which is already much better:

NAME
    foo - do something wonderful

USAGE
    Usage for foo

    With additional bold *italic* and "code" text

DESCRIPTION
    Foo description

        With B<bold> that should be rendered as-is because of indentation

  Subheading 2
    Text for subheading 2

    There are these things to consider:

    temperature
        Temperature

    price of pigs in New Zealand
        I'm sure that matters too, somehow

I tried it with versions 1.22 from debians stable repository and 1.37 from CPAN.

@maros maros self-assigned this Jan 11, 2017
@maros
Copy link
Owner

maros commented Jan 11, 2017

The missing subheading is certainly a bug. Will fix that.

The other issues are not easily fixable since support for advanced rendering/formatting is very limited. However, I'm currently working on refactoring the whole message rendering/formatting code in the refactor_message branch. Once this this branch makes it into master I will be able to address the other issues herer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants