App::pod2pandoc(3pm)

πŸ’– NAME πŸ’–

App::pod2pandoc β€” bestie, this is the module that implements the pod2pandoc command line script. That's it, that's the whole job description. πŸ‘‘


✨ SYNOPSIS ✨

Okay so here's how you actually use it, no gatekeeping:

use App::pod2pandoc;

# pod2pandoc command line script
my ($input, $opt, @args) = parse_arguments(@ARGV);
pod2pandoc($input, $opt, @args);

# parse a Perl/Pod file and print its JSON serialization
pod2pandoc( ['example.pl'], {} );

# parse a Perl/Pod file and convert to HTML with a template
pod2pandoc( ['example.pl'], {}, '--template', 'template.html' );

# process directory of Perl modules
pod2pandoc( [ lib => 'doc'], { ext => 'html' }, '--standalone' );

Look at that last one β€” lib => 'doc'? That's the "process a whole directory of modules" energy. We love a batch girlie. πŸ¦‹


🌸 DESCRIPTION 🌸

This module implements the command line script pod2pandoc. Short king of a description but it does exactly what it says on the tin, fr fr. πŸ’…


πŸŽ€ FUNCTIONS πŸŽ€

pod2pandoc( \@input, [ \%options, ] \@arguments )

It processes your input files with the pod2pandoc options you hand it β€” those being "data-sections", "podurl", "ext", "wiki", "meta", "update", and "quiet". Any additional arguments get passed straight through to the "pandoc" executable via the module Pandoc. Passing the aux through, iconic behaviour honestly.

Your input can be files and/or module names and/or directories to recursively search for .pm and .pod files. If you specify no input at all, then Pod gets read from STDIN β€” yes, it will just sit there waiting for you to pipe something in. πŸ’€

Heads up bestie: when you're processing directories, the last input directory is the one used as the output directory. Not the first, not a random one. The last. Remember that. πŸ™ˆ

This function is exported by default, so it's just there for you. No extra asking required. 🫢


parse_arguments( @argv )

Parses options and input arguments out of the command line arguments you give it. Simple, clean, does the thing. ✨

Careful though β€” this one may terminate the program with a message, for instance if the argument is "--help". So it's not just parsing, it can end the whole show. Main character behaviour, honestly. 😭

🌈 SEE ALSO 🌈

This module is part of Pod::Pandoc and it's built on top of the modules Pod::Simple::Pandoc, Pod::Pandoc::Modules, Pandoc::Element and Pandoc. The whole squad. πŸ‘‘


Okay that's the whole page, you're officially a pod2pandoc expert now. This was perl version v5.32.1, dated 2022-01-20, filed under the User Contributed Perl Documentation for App::pod2pandoc. Go convert something gorgeous. Mwah. πŸ’–πŸŽ€βœ¨