On Wed, Mar 25, 2009 at 05:57:45PM -0700, Bill Ward wrote: > As for where to put it, the way this would be useful to me would not be as > any sort of object (which rules out Class::) but as a sort of assertion or > query about the operating system. You wouldn't need to instantiate any > objects of this class, it would just be for asking "what OS am I running > on?" so OO is really not needed except maybe for some @ISA magic.
> use OS::linux; # would fail under any non-Linux OS You can spell that 'use Devel::AssertOS qw(Linux)' :-) > use OS has_symlinks; # would fail under Windows Strictly speaking whether you have symlinks or not is a function of both the OS and the filesystem. Linux doesn't have symlinks on, eg, FAT, because FAT doesn't support 'em. But if you wanted to create such an assertion, look at Devel::AssertOS::OSFeatures::POSIXShellRedirection for something very similar that you could base it on. You would then say something like: use Devel::AssertOS qw(OSFeatures::SupportsSymLinks); -- David Cantrell | Reality Engineer, Ministry of Information "Cynical" is a word used by the naive to describe the experienced. George Hills, in uknot