diff options
author | Modestas Vainius <modestas@vainius.eu> | 2009-06-29 19:34:05 +0300 |
---|---|---|
committer | Modestas Vainius <modestas@vainius.eu> | 2009-06-30 00:53:07 +0300 |
commit | 4769644604ccd4a49ca242e3461fffdc37927f1d (patch) | |
tree | 3198400ffb5e71493f888ec4d1e45d5645d00713 | |
parent | c8ad61cdba0348c1d1ea1000b99ba83496b71bf1 (diff) |
Rename _canonpath to canonpath.
Signed-off-by: Modestas Vainius <modestas@vainius.eu>
-rw-r--r-- | Debian/Debhelper/Buildsystem.pm | 4 | ||||
-rw-r--r-- | Debian/Debhelper/Buildsystem/python_distutils.pm | 2 | ||||
-rwxr-xr-x | t/buildsystems/buildsystem_tests | 14 |
3 files changed, 10 insertions, 10 deletions
diff --git a/Debian/Debhelper/Buildsystem.pm b/Debian/Debhelper/Buildsystem.pm index e2037b5f..8fcb97e6 100644 --- a/Debian/Debhelper/Buildsystem.pm +++ b/Debian/Debhelper/Buildsystem.pm @@ -84,7 +84,7 @@ sub _set_builddir { # Canonicalize. If build directory ends up the same as source directory, drop it if (defined $this->{builddir}) { - $this->{builddir} = $this->_canonpath($this->{builddir}); + $this->{builddir} = $this->canonpath($this->{builddir}); if ($this->{builddir} eq $this->get_sourcedir()) { $this->{builddir} = undef; } @@ -149,7 +149,7 @@ sub enforce_out_of_source_building { # Enhanced version of File::Spec::canonpath. It collapses .. # too so it may return invalid path if symlinks are involved. # On the other hand, it does not need for the path to exist. -sub _canonpath { +sub canonpath { my ($this, $path)=@_; my @canon; my $back=0; diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm index 73ac2e30..bb502573 100644 --- a/Debian/Debhelper/Buildsystem/python_distutils.pm +++ b/Debian/Debhelper/Buildsystem/python_distutils.pm @@ -18,7 +18,7 @@ sub DESCRIPTION { sub DEFAULT_BUILD_DIRECTORY { my $this=shift; - return $this->_canonpath($this->get_sourcepath("build")); + return $this->canonpath($this->get_sourcepath("build")); } sub new { diff --git a/t/buildsystems/buildsystem_tests b/t/buildsystems/buildsystem_tests index e92e46f1..0c4fcd5c 100755 --- a/t/buildsystems/buildsystem_tests +++ b/t/buildsystems/buildsystem_tests @@ -57,13 +57,13 @@ sub process_stdout { } ### Test Buildsystem class API methods -is( $BS_CLASS->_canonpath("path/to/the/./nowhere/../../somewhere"), - "path/to/somewhere", "_canonpath no1" ); -is( $BS_CLASS->_canonpath("path/to/../forward/../../somewhere"), - "somewhere","_canonpath no2" ); -is( $BS_CLASS->_canonpath("path/to/../../../somewhere"), - "../somewhere","_canonpath no3" ); -is( $BS_CLASS->_canonpath("./"), ".", "_canonpath no4" ); +is( $BS_CLASS->canonpath("path/to/the/./nowhere/../../somewhere"), + "path/to/somewhere", "canonpath no1" ); +is( $BS_CLASS->canonpath("path/to/../forward/../../somewhere"), + "somewhere","canonpath no2" ); +is( $BS_CLASS->canonpath("path/to/../../../somewhere"), + "../somewhere","canonpath no3" ); +is( $BS_CLASS->canonpath("./"), ".", "canonpath no4" ); is( $BS_CLASS->_rel2rel("path/my/file", "path/my"), "file", "_rel2rel no1" ); is( $BS_CLASS->_rel2rel("path/dir/file", "path/my"), |