[Module-build-checkins] Module-Build/lib/Module/Build Base.pm,1.488,1.489
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <kwi...@us...> - 2005-09-30 01:10:12
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7051/lib/Module/Build Modified Files: Base.pm Log Message: New code and tests for finding AUTHOR and ABSTRACT stuff Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.488 retrieving revision 1.489 diff -u -d -r1.488 -r1.489 --- Base.pm 30 Sep 2005 01:01:42 -0000 1.488 +++ Base.pm 30 Sep 2005 01:09:53 -0000 1.489 @@ -733,15 +733,21 @@ return $p->{dist_name}; } -sub dist_version { +sub _find_dist_version_from { my ($self) = @_; my $p = $self->{properties}; - - return $p->{dist_version} if defined $p->{dist_version}; - if ($self->module_name) { $p->{dist_version_from} ||= join( '/', 'lib', split '::', $self->module_name ) . '.pm'; } +} + +sub dist_version { + my ($self) = @_; + my $p = $self->{properties}; + + return $p->{dist_version} if defined $p->{dist_version}; + + $self->_find_dist_version_from; if ( $p->{dist_version_from} ) { my $version_from = File::Spec->catfile( split( qr{/}, $p->{dist_version_from} ) ); @@ -2456,6 +2462,7 @@ sub _main_docfile { my $self = shift; + $self->_find_dist_version_from; my $pm_file = $self->dist_version_from; (my $pod_file = $pm_file) =~ s/.pm$/.pod/; return (-e $pod_file ? $pod_file : $pm_file); |