use Pod::Parser;
my $pp = Pod::Parser.new;
my @data = $pp.parse_file('path/to/file.pod');
my $pod = 'path/to/file.pod'.IO.slurp; my @data = $pp.parse($pod);
(head2) Example
use Pod::Parser;
my $pp = Pod::Parser.new;
my @data = $pp.parse_file('path/to/file.pod');
CATCH {
when X::Pod::Parser {
warn $_;
return;
}
}