diff -ur MarekPodHtml-0.49/lib/Marek/Pod/HTML.pm MarekPodHtml-0.49a/lib/Marek/Pod/HTML.pm --- MarekPodHtml-0.49/lib/Marek/Pod/HTML.pm 2003-01-16 21:49:00.000000000 +0100 +++ MarekPodHtml-0.49a/lib/Marek/Pod/HTML.pm 2004-08-12 02:10:41.145782872 +0200 @@ -319,6 +319,7 @@ _default(\%opts, '-stylesheet', ''); _default(\%opts, '-banner', 1); _default(\%opts, '-idxopt', 'item,x'); + _default(\%opts, '-strname', 'NAME'); # only a single file? if($opts{-filter}) { $opts{-toc} = $opts{-idx} = 0; @@ -407,7 +408,7 @@ # propagate some of the options my %conv_opts; for(qw(-suffix -navigation -localtoc -toc -tocname -toctitle -idx - -idxname -idxtitle -idxopt -stylesheet -verbose -banner)) { + -idxname -idxtitle -idxopt -stylesheet -verbose -banner -strname)) { $conv_opts{$_} = $opts{$_}; } @@ -684,6 +685,9 @@ # a stack for nested lists $self->{_current_anchor} = ''; + # NAME string + $self->{-strname} = "NAME" unless(defined $self->{-strname}); + # no parser errors here, we've seen them in the first pass $self->SUPER::errorsub(sub { return 1; }); } @@ -1183,7 +1187,7 @@ } $pre->push_content("\n"); - if($self->{_current_head1_title} eq 'NAME' && !$self->description()) { + if($self->{_current_head1_title} eq $self->{-strname} && !$self->description()) { # save the description for further use in TOC my $str = $paragraph; $str =~ s/^[\n\s]+//; @@ -1226,7 +1230,7 @@ if(!$self->{_begin}) { my @text = $self->interpolate($paragraph, $line_num); # remember first paragraph in NAME section - if($self->{_current_head1_title} eq 'NAME' && $paragraph && + if($self->{_current_head1_title} eq $self->{-strname} && $paragraph && !$self->description()) { # save the description for further use in TOC $self->description([ HTML::Element->clone_list(@text) ]); diff -ur MarekPodHtml-0.49/scripts/mpod2html.PL MarekPodHtml-0.49a/scripts/mpod2html.PL --- MarekPodHtml-0.49/scripts/mpod2html.PL 2003-01-16 21:48:59.000000000 +0100 +++ MarekPodHtml-0.49a/scripts/mpod2html.PL 2004-08-12 02:18:31.981205008 +0200 @@ -61,6 +61,7 @@ papersize=s inc! script! + strname=s stylesheet=s warnings! verbose! @@ -194,6 +195,7 @@ -psdir => $opt{psdir}, -psfont => $opt{psfont}, -papersize => $opt{papersize}, + -strname => $opt{strname}, -warnings => $opt{warnings}, -verbose => $opt{verbose}, -stylesheet => $opt{stylesheet},