#!/usr/bin/perl use base 'LEOCHARRE::CLI'; use strict; use Pod::POM; use Cwd; my $o = gopts(); #my $files = argv_aspaths(); my @sections = qw(name synopsis description subroutines methods author bugs license); #for my $abs (@$files){ my $abs = Cwd::abs_path($ARGV[0]); my $parser = new Pod::POM; print STDERR "File $abs.\n"; my $pom = $parser->parse($abs) or die; my %section; for my $h ( $pom->head1 ) { my $name = $h->title; my $cont = $h->content; $section{ $name } = $cont; debug("found section $name"); } for (@sections){ my $section = uc($_); my $have = exists $section{$section} ? 1 : 0; print STDERR "Section '$section' is present? $have\n"; unless($have){ #push @{$pom}, # ?????? } } print STDERR "\n"; # view print $pom->present;