Help for this page

Select Code to Download


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