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
17 can_use('Module::Name');
18 can_use('Module::Name', 1.23);
19
20 The "can_use" function tests the ability to load a specific named mod‐
21 ule. Currently it will also actually load the module in the process,
22 although this may change in the future.
23
24 Takes an optional second param of a version number. The currently
25 installed version of the module will be tested to make sure it is equal
26 to or greater than the specified version.
27
28 Returns true if the module can be loaded, or false (in both scalar or
29 list context) if not.
30
31 can_run
32
33 can_run('cvs');
34
35 The "can_run" function tests the ability to run a named command or pro‐
36 gram on the local system.
37
38 Returns true if so, or false (both in scalar and list context) if not.
39
40 can_cc
41
42 can_cc();
43
44 The "can_cc" function test the ability to locate a C compiler on the
45 local system. Returns true if the C compiler can be found, or false
46 (both in scalar and list context) if not.
47
49 Currently, the use of a "can_foo" command in a single problem domain
50 (for example "can_use") results in the inclusion of additional func‐
51 tionality from different problem domains (for example "can_run").
52
53 This module should ultimately be broken up, and the individual func‐
54 tions redestributed to different domain-specific extensions.
55
57 Audrey Tang <autrijus@autrijus.org>
58
59 Adam Kennedy <cpan@ali.as>
60
62 Module::Install, Class::Inspector
63
65 Copyright 2006 Audrey Tang, Adam Kennedy. All rights reserved.
66
67 This program is free software; you can redistribute it and/or modify it
68 under the same terms as Perl itself.
69
70 See <http://www.perl.com/perl/misc/Artistic.html>
71
72
73
74perl v5.8.8 2007-03-05 Module::Install::Can(3)