Devel::AssertOS - require that we are running on a particular OS


Devel-CheckOS documentation Contained in the Devel-CheckOS distribution.

Index


Code Index:

NAME

Top

Devel::AssertOS - require that we are running on a particular OS

DESCRIPTION

Top

Devel::AssertOS is a utility module for Devel::CheckOS and Devel::AssertOS::*. It is nothing but a magic import() that lets you do this:

    use Devel::AssertOS qw(Linux FreeBSD Cygwin);

which will die unless the platform the code is running on is Linux, FreeBSD or Cygwin.

BUGS and FEEDBACK

Top

I welcome feedback about my code, including constructive criticism. Bug reports should be made using http://rt.cpan.org/ or by email.

You will need to include in your bug report the exact value of $^O, what the OS is called (eg Windows Vista 64 bit Ultimate Home Edition), and, if relevant, what "OS family" it should be in and who wrote it.

If you are feeling particularly generous you can encourage me in my open source endeavours by buying me something from my wishlist:http://www.cantrell.org.uk/david/wishlist/

SEE ALSO

Top

$^O in perlvar

perlport

Devel::CheckOS

Devel::AssertOS::Extending

The use-devel-assertos script

Module::Install::AssertOS

AUTHOR

Top

David Cantrell <david@cantrell.org.uk>

Thanks to David Golden for suggesting that I add this utility module.

COPYRIGHT and LICENCE

Top

CONSPIRACY

Top

This module is also free-as-in-mason software.


Devel-CheckOS documentation Contained in the Devel-CheckOS distribution.
# $Id: AssertOS.pm,v 1.5 2008/10/27 20:31:21 drhyde Exp $

package Devel::AssertOS;

use Devel::CheckOS;

use strict;

use vars qw($VERSION);

$VERSION = '1.1';

# localising prevents the warningness leaking out of this module
local $^W = 1;    # use warnings is a 5.6-ism

sub import {
    shift;
    die("Devel::AssertOS needs at least one parameter\n") unless(@_);
    Devel::CheckOS::die_if_os_isnt(@_);
}

$^O;