You are viewing the version of this documentation from Perl 5.24.2. View the latest version

CONTENTS

NAME

Pod::Simple::SimpleTree -- parse Pod into a simple parse tree

SYNOPSIS

% cat ptest.pod

=head1 PIE

I like B<pie>!

% perl -MPod::Simple::SimpleTree -MData::Dumper -e \
   "print Dumper(Pod::Simple::SimpleTree->new->parse_file(shift)->root)" \
   ptest.pod

$VAR1 = [
          'Document',
          { 'start_line' => 1 },
          [
            'head1',
            { 'start_line' => 1 },
            'PIE'
          ],
          [
            'Para',
            { 'start_line' => 3 },
            'I like ',
            [
              'B',
              {},
              'pie'
            ],
            '!'
          ]
        ];

DESCRIPTION

This class is of interest to people writing a Pod processor/formatter.

This class takes Pod and parses it, returning a parse tree made just of arrayrefs, and hashrefs, and strings.

This is a subclass of