Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: including modules during runtime and dealing with OS specific (constants) code block

by DrHyde (Prior)
on Aug 02, 2011 at 10:56 UTC ( [id://918011]=note: print w/replies, xml ) Need Help??

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!
      }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://918011]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-19 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found