- or download this
use Devel::CheckOS qw(os_is);
...
warn "not MSWin32 or MacOSX, falling back to defaults\n";
eval 'use MyApplication::Platform::Default';
}
- or download this
use Win32::File;
use Win32::FileSecurity;
...
if ($attrib & (Win32::File::SYSTEM | Win32::File::HIDDEN))
...
}
- or download this
sub check_dir_is_writeable {
-d $_ && -w $_ && -x $_
}
- or download this
if(check_dir_is_writeable($dir)) {
# yay!
} else {
# ohnoes!
}