Subject: | Special case for linux? |
It seems lchmod() exists in linux, but is only a non-functional stub. This leads to test errors on linux systems: http://matrix.cpantesters.org/?dist=Lchmod%200.02
I think this special case should be handled. I think there could be two solutions:
* if $^O eq 'linux', then try harder to detect that linux really does not support lchmod(), e.g. like this:
diff --git i/lib/Lchmod.pm w/lib/Lchmod.pm
index d105a79..7c708c3 100644
--- i/lib/Lchmod.pm
+++ w/lib/Lchmod.pm
@@ -37,6 +37,12 @@ sub import {
);
};
$LCHMOD_AVAILABLE = 1 if !$@;
+ if ($LCHMOD_AVAILABLE && $^O eq 'linux') {
+ # linux has usually only a non-functional stub implemented
+ if (_sys_lchmod('', 0) == -1 && $! == _get_errno_func_not_impl()) {
+ $LCHMOD_AVAILABLE = 0;
+ }
+ }
}
# ? needed ?
* alternatively check in t/01.lchmod.t after the first call to lchmod() the errno value, and if it is ENOSYS, then skip the remaining test cases