Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I search using your keywords

on perlmonks only  [based on os] based on os -> Splitting an extension based on OS

if , Devel::CheckOS

use if ($^O eq "MSWin32"), 'Win32::Process'; use if ($^O eq "MSWin32"), 'Win32::SearchPath'; use if ($^O ne "MSWin32"), 'POSIX';

using DuckDuckGo  [ddg:// Include a package based on OS.] Include a package based on OS. -> How can I include a module for Windows only??

Using Google  [google:// Include a package based on OS.] Include a package based on OS. -> How can I include a module for Windows only??, including modules during runtime and dealing with OS specific (constants) code block, Splitting an extension based on OS

My memory Re: How do you use the if pragma? , Re^5: Problems with forking, Re^3: Loading a module at runtime, Re: mention a non-installed module in script, Re: constants wont optimize, Re^3: How to have OS specific code sections in Perl, Re: Variable as module name? (modern perl), Re^2: Redefining Imported Subs: of scope and no, use Module::Implementation


use Perl::OSType qw' is_os_type '; use if is_os_type('Windows'), qw' Win32::SerialPort '; use if not is_os_type('Windows'), qw' Device::SerialPort ';

ssearch , its for everybody

In reply to Re: Include a package based on OS (ssearch) by Anonymous Monk
in thread Include a package based on OS. by techman2006

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2023-12-10 23:40 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.