[Module-build-checkins] Module-Build/lib/Module/Build Base.pm,1.538,1.539
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <si...@us...> - 2005-12-14 23:30:34
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20449/lib/Module/Build Modified Files: Base.pm Log Message: Pod::Simple based parsers only support one document per instance. Recent versions of Pod::Man reveal this bug, resulting in empty manpages. This issue is known, and Pod::Simple will be fixed to allow multiple instances. Until then we create a new instance for each manpage. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.538 retrieving revision 1.539 diff -u -d -r1.538 -r1.539 --- Base.pm 4 Dec 2005 09:50:13 -0000 1.538 +++ Base.pm 14 Dec 2005 23:30:25 -0000 1.539 @@ -2187,16 +2187,19 @@ sub manify_bin_pods { my $self = shift; - require Pod::Man; - my $parser = Pod::Man->new( section => 1 ); # binary manpages go in section 1 + my $files = $self->_find_pods( $self->{properties}{bindoc_dirs}, exclude => [ qr/\.bat$/ ] ); return unless keys %$files; - + my $mandir = File::Spec->catdir( $self->blib, 'bindoc' ); File::Path::mkpath( $mandir, 0, 0777 ); + require Pod::Man; foreach my $file (keys %$files) { + # Pod::Simple based parsers only support one document per instance. + # This is expected to change in a future version (Pod::Simple > 3.03). + my $parser = Pod::Man->new( section => 1 ); # binaries go in section 1 my $manpage = $self->man1page_name( $file ) . '.' . $self->config( 'man1ext' ); my $outfile = File::Spec->catfile($mandir, $manpage); @@ -2209,15 +2212,18 @@ sub manify_lib_pods { my $self = shift; - require Pod::Man; - my $parser = Pod::Man->new( section => 3 ); # library manpages go in section 3 + my $files = $self->_find_pods($self->{properties}{libdoc_dirs}); return unless keys %$files; - + my $mandir = File::Spec->catdir( $self->blib, 'libdoc' ); File::Path::mkpath( $mandir, 0, 0777 ); + require Pod::Man; while (my ($file, $relfile) = each %$files) { + # Pod::Simple based parsers only support one document per instance. + # This is expected to change in a future version (Pod::Simple > 3.03). + my $parser = Pod::Man->new( section => 3 ); # libraries go in section 3 my $manpage = $self->man3page_name( $relfile ) . '.' . $self->config( 'man3ext' ); my $outfile = File::Spec->catfile( $mandir, $manpage); |