demerphq wrote:
On 1/30/06, David Cantrell <[EMAIL PROTECTED]> wrote:
So how, then, do I tell the testing system "this module only works on
Unix-like filesystems on Unix-like OSes"?
Hopefully it will be something like:
$I::don't::bother::to::write::portable::code=1;
My code is as portable as I can make it. Feel free to submit patches
for platforms that I don't have reasonable access to. Portability is
something I care a lot about.
How do you define "unix-like filesystems on unix-like oses" btw? Would
win32 count and what reason would you give for your answer, whatever
it is.
Is that Win95, NT, 2000 or Windows for Teletubbies; and is that using
NTFS, FAT16, FAT32, ext2*, HFS+*, HPFS, or whatever the hell it is that
MS have added in the latest version? If it's FAT or Win95 the answer is
"no" cos they have no concept of permissions. If it's anything else
then I don't know but I suspect not. The Windows permissions model is
VERY different, and I don't think it has a sane getpwent(), getgrent()
or anything like Unixy mode bits. It's arguably far superior to the
Unix one (although IIRC neither is a patch on Novell) but that's
irrelevant as I don't have a Windows box to play with.
The module in question is File::Find::Rule::Permissions, which just
happens to have a very sucky test suite at the moment** because it's
very old and also because a comprehensive test suite would have to run
as a priveleged user which I don't like doing***. Fixing it is on my
to-do list. However, when I fix it I still can't fix it for platforms I
have no reasonable access to.
* both of these have been available as hideous hacks
** it compiles, ship it!
*** the intention is to test the logic, if not the whole thing, by
over-riding certain functions during testing; the hooks are already
in there for doing this
--
David Cantrell