# $Id: AssertOS.pm,v 1.2 2007/09/28 16:30:11 drhyde Exp $ package Devel::AssertOS; use Devel::CheckOS qw(die_if_os_isnt); use strict; use vars qw($VERSION); $VERSION = '1.0'; # localising prevents the warningness leaking out of this module local $^W = 1; # use warnings is a 5.6-ism =head1 NAME Devel::AssertOS - require that we are running on a particular OS =head1 DESCRIPTION Devel::AssertOS is a utility module for Devel::CheckOS and Devel::AssertOS::*. It is nothing but a magic C 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. =cut sub import { shift; die("Devel::AssertOS needs at least one parameter\n") unless(@_); die_if_os_isnt(@_); } =head1 BUGS and FEEDBACK I welcome feedback about my code, including constructive criticism. Bug reports should be made using L 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: L =head1 SEE ALSO $^O in L L L L =head1 AUTHOR David Cantrell EFE Thanks to David Golden for suggesting that I add this utility module. =head1 COPYRIGHT and LICENCE Copyright 2007 David Cantrell This module is free-as-in-speech software, and may be used, distributed, and modified under the same conditions as perl itself. =head1 CONSPIRACY This module is also free-as-in-mason software. =cut $^O;