summaryrefslogtreecommitdiffstats
path: root/upstream/mageia-cauldron/man3pm/ExtUtils::Command::MM.3pm
blob: a60d8e44f18dc86c907393327a8aa715e1d5f104 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "ExtUtils::Command::MM 3pm"
.TH ExtUtils::Command::MM 3pm 2023-11-28 "perl v5.38.2" "Perl Programmers Reference Guide"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
ExtUtils::Command::MM \- Commands for the MM's to use in Makefiles
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 1
\&  perl "\-MExtUtils::Command::MM" \-e "function" "\-\-" arguments...
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
\&\fBFOR INTERNAL USE ONLY!\fR  The interface is not stable.
.PP
ExtUtils::Command::MM encapsulates code which would otherwise have to
be done with large "one" liners.
.PP
Any $(FOO) used in the examples are make variables, not Perl.
.IP \fBtest_harness\fR 4
.IX Item "test_harness"
.Vb 1
\&  test_harness($verbose, @test_libs);
.Ve
.Sp
Runs the tests on \f(CW@ARGV\fR via Test::Harness passing through the \f(CW$verbose\fR
flag.  Any \f(CW@test_libs\fR will be unshifted onto the test's \f(CW@INC\fR.
.Sp
\&\f(CW@test_libs\fR are run in alphabetical order.
.IP \fBpod2man\fR 4
.IX Item "pod2man"
.Vb 5
\&  pod2man( \*(Aq\-\-option=value\*(Aq,
\&           $podfile1 => $manpage1,
\&           $podfile2 => $manpage2,
\&           ...
\&         );
\&
\&  # or args on @ARGV
.Ve
.Sp
\&\fBpod2man()\fR is a function performing most of the duties of the pod2man
program.  Its arguments are exactly the same as pod2man as of 5.8.0
with the addition of:
.Sp
.Vb 1
\&    \-\-perm_rw   octal permission to set the resulting manpage to
.Ve
.Sp
And the removal of:
.Sp
.Vb 2
\&    \-\-verbose/\-v
\&    \-\-help/\-h
.Ve
.Sp
If no arguments are given to pod2man it will read from \f(CW@ARGV\fR.
.Sp
If Pod::Man is unavailable, this function will warn and return undef.
.IP \fBwarn_if_old_packlist\fR 4
.IX Item "warn_if_old_packlist"
.Vb 1
\&  perl "\-MExtUtils::Command::MM" \-e warn_if_old_packlist <somefile>
.Ve
.Sp
Displays a warning that an old packlist file was found.  Reads the
filename from \f(CW@ARGV\fR.
.IP \fBperllocal_install\fR 4
.IX Item "perllocal_install"
.Vb 2
\&    perl "\-MExtUtils::Command::MM" \-e perllocal_install
\&        <type> <module name> <key> <value> ...
\&
\&    # VMS only, key|value pairs come on STDIN
\&    perl "\-MExtUtils::Command::MM" \-e perllocal_install
\&        <type> <module name> < <key>|<value> ...
.Ve
.Sp
Prints a fragment of POD suitable for appending to perllocal.pod.
Arguments are read from \f(CW@ARGV\fR.
.Sp
\&'type' is the type of what you're installing.  Usually 'Module'.
.Sp
\&'module name' is simply the name of your module.  (Foo::Bar)
.Sp
Key/value pairs are extra information about the module.  Fields include:
.Sp
.Vb 5
\&    installed into      which directory your module was out into
\&    LINKTYPE            dynamic or static linking
\&    VERSION             module version number
\&    EXE_FILES           any executables installed in a space separated
\&                        list
.Ve
.IP \fBuninstall\fR 4
.IX Item "uninstall"
.Vb 1
\&    perl "\-MExtUtils::Command::MM" \-e uninstall <packlist>
.Ve
.Sp
A wrapper around \fBExtUtils::Install::uninstall()\fR.  Warns that
uninstallation is deprecated and doesn't actually perform the
uninstallation.
.IP \fBtest_s\fR 4
.IX Item "test_s"
.Vb 1
\&   perl "\-MExtUtils::Command::MM" \-e test_s <file>
.Ve
.Sp
Tests if a file exists and is not empty (size > 0).
\&\fIExits\fR with 0 if it does, 1 if it does not.
.IP \fBcp_nonempty\fR 4
.IX Item "cp_nonempty"
.Vb 1
\&  perl "\-MExtUtils::Command::MM" \-e cp_nonempty <srcfile> <dstfile> <perm>
.Ve
.Sp
Tests if the source file exists and is not empty (size > 0). If it is not empty
it copies it to the given destination with the given permissions.