[Module-build-checkins] Module-Build/lib/Module/Build Base.pm,1.435,1.436
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <kwi...@us...> - 2005-06-23 00:35:23
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27402/lib/Module/Build Modified Files: Base.pm Log Message: Simplify _catprefix() by using the 2-arg form of catpath() Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.435 retrieving revision 1.436 diff -u -d -r1.435 -r1.436 --- Base.pm 23 Jun 2005 00:27:43 -0000 1.435 +++ Base.pm 23 Jun 2005 00:35:14 -0000 1.436 @@ -2700,17 +2700,12 @@ sub _catprefix { my($self, $rprefix, $default) = @_; - # Most file path types do not distinguish between a file and a directory - # so the "file" part here is usually part of the directory. - my($rvol, @rdirs) = File::Spec->splitpath($rprefix); - if( $rvol ) { - return File::Spec->catpath($rvol, - File::Spec->catdir(@rdirs, $default), - '' - ) - } else { - return File::Spec->catdir(@rdirs, $default); - } + # The "1" means don't look for a file, $rprefix is a directory. + my($rvol, @rdirs) = File::Spec->splitpath($rprefix, 1); + return File::Spec->catpath($rvol, + File::Spec->catdir(@rdirs, $default), + '' + ); } |