1Module::Install::Can(3)User Contributed Perl DocumentatioMnodule::Install::Can(3)
2
3
4
6 Module::Install::Can - Utility functions for capability detection
7
9 "Module::Install::Can" contains a number of functions for authors to
10 use when creating customised smarter installers. The functions simplify
11 standard tests so that you can express your dependencies and conditions
12 much more simply, and make your installer much easier to maintain.
13
15 can_use
16 can_use('Module::Name');
17 can_use('Module::Name', 1.23);
18
19 The "can_use" function tests the ability to load a specific named
20 module. Currently it will also actually load the module in the process,
21 although this may change in the future.
22
23 Takes an optional second param of a version number. The currently
24 installed version of the module will be tested to make sure it is equal
25 to or greater than the specified version.
26
27 Returns true if the module can be loaded, or false (in both scalar or
28 list context) if not.
29
30 can_run
31 can_run('cvs');
32
33 The "can_run" function tests the ability to run a named command or
34 program on the local system.
35
36 Returns true if so, or false (both in scalar and list context) if not.
37
38 can_cc
39 can_cc();
40
41 The "can_cc" function test the ability to locate a C compiler on the
42 local system. Returns true if the C compiler can be found, or false
43 (both in scalar and list context) if not.
44
46 Currently, the use of a "can_foo" command in a single problem domain
47 (for example "can_use") results in the inclusion of additional
48 functionality from different problem domains (for example "can_run").
49
50 This module should ultimately be broken up, and the individual
51 functions redestributed to different domain-specific extensions.
52
54 Audrey Tang <autrijus@autrijus.org>
55
56 Adam Kennedy <adamk@cpan.org>
57
59 Module::Install, Class::Inspector
60
62 Copyright 2006 Audrey Tang, Adam Kennedy.
63
64 This program is free software; you can redistribute it and/or modify it
65 under the same terms as Perl itself.
66
67 See <http://www.perl.com/perl/misc/Artistic.html>
68
69
70
71perl v5.10.1 2009-05-27 Module::Install::Can(3)