Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / inc / Devel / AssertOS.pm
1 # $Id: AssertOS.pm,v 1.2 2007/09/28 16:30:11 drhyde Exp $
2
3 package Devel::AssertOS;
4
5 use Devel::CheckOS qw(die_if_os_isnt);
6
7 use strict;
8
9 use vars qw($VERSION);
10
11 $VERSION = '1.0';
12
13 # localising prevents the warningness leaking out of this module
14 local $^W = 1;    # use warnings is a 5.6-ism
15
16 =head1 NAME
17
18 Devel::AssertOS - require that we are running on a particular OS
19
20 =head1 DESCRIPTION
21
22 Devel::AssertOS is a utility module for Devel::CheckOS and
23 Devel::AssertOS::*.  It is nothing but a magic C<import()> that lets you
24 do this:
25
26     use Devel::AssertOS qw(Linux FreeBSD Cygwin);
27
28 which will die unless the platform the code is running on is Linux, FreeBSD
29 or Cygwin.
30
31 =cut
32
33 sub import {
34     shift;
35     die("Devel::AssertOS needs at least one parameter\n") unless(@_);
36     die_if_os_isnt(@_);
37 }
38
39 =head1 BUGS and FEEDBACK
40
41 I welcome feedback about my code, including constructive criticism.
42 Bug reports should be made using L<http://rt.cpan.org/> or by email.
43
44 You will need to include in your bug report the exact value of $^O, what
45 the OS is called (eg Windows Vista 64 bit Ultimate Home Edition), and,
46 if relevant, what "OS family" it should be in and who wrote it.
47
48 If you are feeling particularly generous you can encourage me in my
49 open source endeavours by buying me something from my wishlist:
50   L<http://www.cantrell.org.uk/david/wishlist/>
51
52 =head1 SEE ALSO
53
54 $^O in L<perlvar>
55
56 L<perlport>
57
58 L<Devel::CheckOS>
59
60 L<Devel::AssertOS::Extending>
61
62 =head1 AUTHOR
63
64 David Cantrell E<lt>F<david@cantrell.org.uk>E<gt>
65
66 Thanks to David Golden for suggesting that I add this utility module.
67
68 =head1 COPYRIGHT and LICENCE
69
70 Copyright 2007 David Cantrell
71
72 This module is free-as-in-speech software, and may be used, distributed,
73 and modified under the same conditions as perl itself.
74
75 =head1 CONSPIRACY
76
77 This module is also free-as-in-mason software.
78
79 =cut
80
81 $^O;