use Pod::POM; my $parser = Pod::POM->new(); my $pom = $parser->parse_file(...); my $h1 = $pom->add($parser, 'head1', 'This is a new head1');