Skip to content

Produce POD from a Pod::Simple::SimpleTree tree #192

@book

Description

@book

Pod::Simple::SimpleTree returns a tree-like data structure. I'm trying to use one of those for manipulating POD, and reorganizing a POD document programmatically.

I couldn't find code in Pod-Simple for turning the tree back into POD, so I wrote my own.

Right now, it's a simple as_pod function that takes the array ref returned by the root method and returns the POD as a string. It took less than 50 lines of code.

Would such functionality be useful to share as part of Pod-Simple?

My main issue is I don't know where to put it. I'm thinking as a method of the parser:

my $parser = Pod::Simple::SimpleTree->new;
my $tree = $parser->parse_file( $file )->root;
say $parser->as_pod( $tree ); # maybe use $self->root as the default?

Is it worth sending a patch? What's the minimum Perl version I should try to support?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions