[Module-build-checkins] Module-Build/lib/Module/Build Base.pm,1.515,1.516
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <si...@us...> - 2005-11-14 06:49:37
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12472/lib/Module/Build Modified Files: Base.pm Log Message: When documentation actions are invoked implicitly, ensure that they generate documentation only if a default setup where Config.pm provides the install configuration or if the user has setup the configuration manually with by install-path. This ensures consistency between the default install configuration and installs using install-base or prefix. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.515 retrieving revision 1.516 diff -u -d -r1.515 -r1.516 --- Base.pm 14 Nov 2005 05:47:58 -0000 1.515 +++ Base.pm 14 Nov 2005 06:49:29 -0000 1.516 @@ -2134,6 +2134,19 @@ $self->depends_on('manpages', 'html'); } +# Given a file type, will return true if the file type would normally +# be installed when neither install-base nor prefix has been set. +# I.e. it will be true only if the path is set from Config.pm or +# set explicitly by the user via install-path. +sub _is_default_installable { + my $self = shift; + my $type = shift; + return ( $self->install_destination($type) && + ( $self->install_path->{$type} || + $self->install_sets->{$self->installdirs}{$type} ) + ) ? 1 : 0; +} + sub ACTION_manpages { my $self = shift; @@ -2151,7 +2164,7 @@ if ( $self->invoked_action eq 'manpages' ) { $self->$sub(); - } elsif ( $self->install_destination("${type}doc") ) { + } elsif ( $self->_is_default_installable("${type}doc") ) { $self->$sub(); } } @@ -2241,7 +2254,7 @@ if ( $self->invoked_action eq 'html' ) { $self->htmlify_pods( $type ); - } elsif ( $self->install_destination("${type}html") ) { + } elsif ( $self->_is_default_installable("${type}html") ) { $self->htmlify_pods( $type ); } } |