Debian Codegraph @

upstream/opensuse-tumbleweed/man3/Test2::V0.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "Test2::V0 3pm"
61 .TH Test2::V0 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 Test2::V0 \- 0Th edition of the Test2 recommended bundle.
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 This is the big\-daddy bundle. This bundle includes nearly every tool, and
71 several plugins, that the Test2 author uses. This bundle is used
72 extensively to test Test2::Suite itself.
73 .SH "NAMING, USING, DEPENDING"
74 .IX Header "NAMING, USING, DEPENDING"
75 This bundle should not change in a \fIseverely\fR incompatible way. Some minor
76 breaking changes, specially bugfixes, may be allowed. If breaking changes are
77 needed then a new \f(CW\*(C`Test2::V#\*(C'\fR module should be released instead.
78 .PP
79 As new \f(CW\*(C`V#\*(C'\fR modules are released old ones \fImay\fR be moved to different cpan
80 distributions. You should always use a specific bundle version and list that
81 version in your distributions testing requirements. You should never simply
82 list Test2::Suite as your modules dep, instead list the specific bundle, or
83 tools and plugins you use directly in your metadata.
84 .SH SYNOPSIS
85 .IX Header "SYNOPSIS"
86 .Vb 1
87 \& use Test2::V0;
88 \&
89 \& ok(1, "pass");
90 \&
91 \& ...
92 \&
93 \& done_testing;
94 .Ve
95 .SH "RESOLVING CONFLICTS WITH MOOSE"
96 .IX Header "RESOLVING CONFLICTS WITH MOOSE"
97 .Vb 1
98 \& use Test2::V0 \*(Aq!meta\*(Aq;
99 .Ve
100 .PP
101 Moose and Test2::V0 both export very different \f(CWmeta()\fR
102 subs. Adding \f(CW\*(Aq!meta\*(Aq\fR to the import args will prevent the sub from being
103 imported. This bundle also exports the sub under the name \f(CWmeta_check()\fR so
104 you can use that spelling as an alternative.
105 .SS TAGS
106 .IX Subsection "TAGS"
107 .IP :DEFAULT 4
108 .IX Item ":DEFAULT"
109 The following are both identical:
110 .Sp
111 .Vb 1
112 \& use Test2::V0;
113 \&
114 \& use Test2::V0 \*(Aq:DEFAULT\*(Aq;
115 .Ve
116 .SS "RENAMING ON IMPORT"
117 .IX Subsection "RENAMING ON IMPORT"
118 .Vb 1
119 \& use Test2::V0 \*(Aq:DEFAULT\*(Aq, \*(Aq!ok\*(Aq, ok => {\-as => \*(Aqmy_ok\*(Aq};
120 .Ve
121 .PP
122 This bundle uses Test2::Util::Importer for exporting, as such you can use any arguments
123 it accepts.
124 .PP
125 Explanation:
126 .IP \*(Aq!ok\*(Aq 4
127 .IX Item "'!ok'"
128 Do not export \f(CWok()\fR
129 .IP "ok => {\-as => \*(Aqmy_ok\*(Aq}" 4
130 .IX Item "ok => {-as => 'my_ok'}"
131 Actually, go ahead and import \f(CWok()\fR but under the name \f(CWmy_ok()\fR.
132 .PP
133 If you did not add the \f(CW\*(Aq!ok\*(Aq\fR argument then you would have both \f(CWok()\fR and
134 \&\f(CWmy_ok()\fR
135 .SH PRAGMAS
136 .IX Header "PRAGMAS"
137 All of these can be disabled via individual import arguments, or by the
138 \&\f(CW\*(C`\-no_pragmas\*(C'\fR argument.
139 .PP
140 .Vb 1
141 \& use Test2::V0 \-no_pragmas => 1;
142 .Ve
143 .SS STRICT
144 .IX Subsection "STRICT"
145 strict is turned on for you. You can disable this with the \f(CW\*(C`\-no_strict\*(C'\fR or
146 \&\f(CW\*(C`\-no_pragmas\*(C'\fR import arguments:
147 .PP
148 .Vb 1
149 \& use Test2::V0 \-no_strict => 1;
150 .Ve
151 .SS WARNINGS
152 .IX Subsection "WARNINGS"
153 warnings are turned on for you. You can disable this with the
154 \&\f(CW\*(C`\-no_warnings\*(C'\fR or \f(CW\*(C`\-no_pragmas\*(C'\fR import arguments:
155 .PP
156 .Vb 1
157 \& use Test2::V0 \-no_warnings => 1;
158 .Ve
159 .SS UTF8
160 .IX Subsection "UTF8"
161 This is actually done via the Test2::Plugin::UTF8 plugin, see the
162 "PLUGINS" section for details.
163 .PP
164 \&\fBNote:\fR \f(CW\*(C`\-no_pragmas => 1\*(C'\fR will turn off the entire plugin.
165 .SH PLUGINS
166 .IX Header "PLUGINS"
167 .SS SRAND
168 .IX Subsection "SRAND"
169 See Test2::Plugin::SRand.
170 .PP
171 This will set the random seed to today\*(Aqs date. You can provide an alternate seed
172 with the \f(CW\*(C`\-srand\*(C'\fR import option:
173 .PP
174 .Vb 1
175 \& use Test2::V0 \-srand => 1234;
176 .Ve
177 .PP
178 You can also disable this behavior:
179 .PP
180 .Vb 1
181 \& use Test2::V0 \-no_srand => 1;
182 .Ve
183 .PP
184 \&\fBNote\fR When srand is on (default) it can cause problems with things like
185 File::Temp which will end up attempting the same "random" filenames for
186 every test process started on a given day (or sharing the same seed).
187 .SS UTF8
188 .IX Subsection "UTF8"
189 See Test2::Plugin::UTF8.
190 .PP
191 This will set the file, and all output handles (including formatter handles), to
192 utf8. This will turn on the utf8 pragma for the current scope.
193 .PP
194 This can be disabled using the \f(CW\*(C`\-no_utf8 => 1\*(C'\fR or \f(CW\*(C`\-no_pragmas => 1\*(C'\fR
195 import arguments.
196 .PP
197 .Vb 1
198 \& use Test2::V0 \-no_utf8 => 1;
199 .Ve
200 .SS "EXIT SUMMARY"
201 .IX Subsection "EXIT SUMMARY"
202 See Test2::Plugin::ExitSummary.
203 .PP
204 This plugin has no configuration.
205 .SH "ENVIRONMENT VARIABLES"
206 .IX Header "ENVIRONMENT VARIABLES"
207 See Test2::Env for a list of meaningul environment variables.
208 .SH "API FUNCTIONS"
209 .IX Header "API FUNCTIONS"
210 See Test2::API for these
211 .ie n .IP "$ctx = \fBcontext()\fR" 4
212 .el .IP "\f(CW$ctx\fR = \fBcontext()\fR" 4
213 .IX Item "$ctx = context()"
214 .PD 0
215 .ie n .IP "$events = intercept { ... }" 4
216 .el .IP "\f(CW$events\fR = intercept { ... }" 4
217 .IX Item "$events = intercept { ... }"
218 .PD
219 .SH TOOLS
220 .IX Header "TOOLS"
221 .SS TARGET
222 .IX Subsection "TARGET"
223 See Test2::Tools::Target.
224 .PP
225 You can specify a target class with the \f(CW\*(C`\-target\*(C'\fR import argument. If you do
226 not provide a target then \f(CW$CLASS\fR and \f(CWCLASS()\fR will not be imported.
227 .PP
228 .Vb 1
229 \& use Test2::V0 \-target => \*(AqMy::Class\*(Aq;
230 \&
231 \& print $CLASS; # My::Class
232 \& print CLASS(); # My::Class
233 .Ve
234 .PP
235 Or you can specify names:
236 .PP
237 .Vb 1
238 \& use Test2::V0 \-target => { pkg => \*(AqSome::Package\*(Aq };
239 \&
240 \& pkg()\->xxx; # Call \*(Aqxxx\*(Aq on Some::Package
241 \& $pkg\->xxx; # Same
242 .Ve
243 .ie n .IP $CLASS 4
244 .el .IP \f(CW$CLASS\fR 4
245 .IX Item "$CLASS"
246 Package variable that contains the target class name.
247 .ie n .IP "$class = \fBCLASS()\fR" 4
248 .el .IP "\f(CW$class\fR = \fBCLASS()\fR" 4
249 .IX Item "$class = CLASS()"
250 Constant function that returns the target class name.
251 .SS DEFER
252 .IX Subsection "DEFER"
253 See Test2::Tools::Defer.
254 .ie n .IP "def $func => @args;" 4
255 .el .IP "def \f(CW$func\fR => \f(CW@args\fR;" 4
256 .IX Item "def $func => @args;"
257 .PD 0
258 .IP \fBdo_def()\fR 4
259 .IX Item "do_def()"
260 .PD
261 .SS BASIC
262 .IX Subsection "BASIC"
263 See Test2::Tools::Basic.
264 .ie n .IP "ok($bool, $name)" 4
265 .el .IP "ok($bool, \f(CW$name\fR)" 4
266 .IX Item "ok($bool, $name)"
267 .PD 0
268 .ie n .IP "ok($bool, $name, @diag)" 4
269 .el .IP "ok($bool, \f(CW$name\fR, \f(CW@diag\fR)" 4
270 .IX Item "ok($bool, $name, @diag)"
271 .IP pass($name) 4
272 .IX Item "pass($name)"
273 .ie n .IP "pass($name, @diag)" 4
274 .el .IP "pass($name, \f(CW@diag\fR)" 4
275 .IX Item "pass($name, @diag)"
276 .IP fail($name) 4
277 .IX Item "fail($name)"
278 .ie n .IP "fail($name, @diag)" 4
279 .el .IP "fail($name, \f(CW@diag\fR)" 4
280 .IX Item "fail($name, @diag)"
281 .IP diag($message) 4
282 .IX Item "diag($message)"
283 .IP note($message) 4
284 .IX Item "note($message)"
285 .ie n .IP "$todo = todo($reason)" 4
286 .el .IP "\f(CW$todo\fR = todo($reason)" 4
287 .IX Item "$todo = todo($reason)"
288 .ie n .IP "todo $reason => sub { ... }" 4
289 .el .IP "todo \f(CW$reason\fR => sub { ... }" 4
290 .IX Item "todo $reason => sub { ... }"
291 .ie n .IP "skip($reason, $count)" 4
292 .el .IP "skip($reason, \f(CW$count\fR)" 4
293 .IX Item "skip($reason, $count)"
294 .IP plan($count) 4
295 .IX Item "plan($count)"
296 .IP skip_all($reason) 4
297 .IX Item "skip_all($reason)"
298 .IP \fBdone_testing()\fR 4
299 .IX Item "done_testing()"
300 .IP bail_out($reason) 4
301 .IX Item "bail_out($reason)"
302 .PD
303 .SS COMPARE
304 .IX Subsection "COMPARE"
305 See Test2::Tools::Compare.
306 .ie n .IP "is($got, $want, $name)" 4
307 .el .IP "is($got, \f(CW$want\fR, \f(CW$name\fR)" 4
308 .IX Item "is($got, $want, $name)"
309 .PD 0
310 .ie n .IP "isnt($got, $do_not_want, $name)" 4
311 .el .IP "isnt($got, \f(CW$do_not_want\fR, \f(CW$name\fR)" 4
312 .IX Item "isnt($got, $do_not_want, $name)"
313 .ie n .IP "like($got, qr/match/, $name)" 4
314 .el .IP "like($got, qr/match/, \f(CW$name\fR)" 4
315 .IX Item "like($got, qr/match/, $name)"
316 .ie n .IP "unlike($got, qr/mismatch/, $name)" 4
317 .el .IP "unlike($got, qr/mismatch/, \f(CW$name\fR)" 4
318 .IX Item "unlike($got, qr/mismatch/, $name)"
319 .ie n .IP "$check = match(qr/pattern/)" 4
320 .el .IP "\f(CW$check\fR = match(qr/pattern/)" 4
321 .IX Item "$check = match(qr/pattern/)"
322 .ie n .IP "$check = mismatch(qr/pattern/)" 4
323 .el .IP "\f(CW$check\fR = mismatch(qr/pattern/)" 4
324 .IX Item "$check = mismatch(qr/pattern/)"
325 .ie n .IP "$check = validator(sub { return $bool })" 4
326 .el .IP "\f(CW$check\fR = validator(sub { return \f(CW$bool\fR })" 4
327 .IX Item "$check = validator(sub { return $bool })"
328 .ie n .IP "$check = hash { ... }" 4
329 .el .IP "\f(CW$check\fR = hash { ... }" 4
330 .IX Item "$check = hash { ... }"
331 .ie n .IP "$check = array { ... }" 4
332 .el .IP "\f(CW$check\fR = array { ... }" 4
333 .IX Item "$check = array { ... }"
334 .ie n .IP "$check = bag { ... }" 4
335 .el .IP "\f(CW$check\fR = bag { ... }" 4
336 .IX Item "$check = bag { ... }"
337 .ie n .IP "$check = object { ... }" 4
338 .el .IP "\f(CW$check\fR = object { ... }" 4
339 .IX Item "$check = object { ... }"
340 .ie n .IP "$check = meta { ... }" 4
341 .el .IP "\f(CW$check\fR = meta { ... }" 4
342 .IX Item "$check = meta { ... }"
343 .ie n .IP "$check = number($num)" 4
344 .el .IP "\f(CW$check\fR = number($num)" 4
345 .IX Item "$check = number($num)"
346 .ie n .IP "$check = string($str)" 4
347 .el .IP "\f(CW$check\fR = string($str)" 4
348 .IX Item "$check = string($str)"
349 .ie n .IP "$check = bool($bool)" 4
350 .el .IP "\f(CW$check\fR = bool($bool)" 4
351 .IX Item "$check = bool($bool)"
352 .ie n .IP "$check = check_isa($class_name)" 4
353 .el .IP "\f(CW$check\fR = check_isa($class_name)" 4
354 .IX Item "$check = check_isa($class_name)"
355 .ie n .IP "$check = in_set(@things)" 4
356 .el .IP "\f(CW$check\fR = in_set(@things)" 4
357 .IX Item "$check = in_set(@things)"
358 .ie n .IP "$check = not_in_set(@things)" 4
359 .el .IP "\f(CW$check\fR = not_in_set(@things)" 4
360 .IX Item "$check = not_in_set(@things)"
361 .ie n .IP "$check = check_set(@things)" 4
362 .el .IP "\f(CW$check\fR = check_set(@things)" 4
363 .IX Item "$check = check_set(@things)"
364 .ie n .IP "$check = item($thing)" 4
365 .el .IP "\f(CW$check\fR = item($thing)" 4
366 .IX Item "$check = item($thing)"
367 .ie n .IP "$check = item($idx => $thing)" 4
368 .el .IP "\f(CW$check\fR = item($idx => \f(CW$thing\fR)" 4
369 .IX Item "$check = item($idx => $thing)"
370 .ie n .IP "$check = field($name => $val)" 4
371 .el .IP "\f(CW$check\fR = field($name => \f(CW$val\fR)" 4
372 .IX Item "$check = field($name => $val)"
373 .ie n .IP "$check = call($method => $expect)" 4
374 .el .IP "\f(CW$check\fR = call($method => \f(CW$expect\fR)" 4
375 .IX Item "$check = call($method => $expect)"
376 .ie n .IP "$check = call_list($method => $expect)" 4
377 .el .IP "\f(CW$check\fR = call_list($method => \f(CW$expect\fR)" 4
378 .IX Item "$check = call_list($method => $expect)"
379 .ie n .IP "$check = call_hash($method => $expect)" 4
380 .el .IP "\f(CW$check\fR = call_hash($method => \f(CW$expect\fR)" 4
381 .IX Item "$check = call_hash($method => $expect)"
382 .ie n .IP "$check = prop($name => $expect)" 4
383 .el .IP "\f(CW$check\fR = prop($name => \f(CW$expect\fR)" 4
384 .IX Item "$check = prop($name => $expect)"
385 .ie n .IP "$check = check($thing)" 4
386 .el .IP "\f(CW$check\fR = check($thing)" 4
387 .IX Item "$check = check($thing)"
388 .ie n .IP "$check = T()" 4
389 .el .IP "\f(CW$check\fR = T()" 4
390 .IX Item "$check = T()"
391 .ie n .IP "$check = F()" 4
392 .el .IP "\f(CW$check\fR = F()" 4
393 .IX Item "$check = F()"
394 .ie n .IP "$check = D()" 4
395 .el .IP "\f(CW$check\fR = D()" 4
396 .IX Item "$check = D()"
397 .ie n .IP "$check = \fBDF()\fR" 4
398 .el .IP "\f(CW$check\fR = \fBDF()\fR" 4
399 .IX Item "$check = DF()"
400 .ie n .IP "$check = E()" 4
401 .el .IP "\f(CW$check\fR = E()" 4
402 .IX Item "$check = E()"
403 .ie n .IP "$check = \fBDNE()\fR" 4
404 .el .IP "\f(CW$check\fR = \fBDNE()\fR" 4
405 .IX Item "$check = DNE()"
406 .ie n .IP "$check = \fBFDNE()\fR" 4
407 .el .IP "\f(CW$check\fR = \fBFDNE()\fR" 4
408 .IX Item "$check = FDNE()"
409 .ie n .IP "$check = U()" 4
410 .el .IP "\f(CW$check\fR = U()" 4
411 .IX Item "$check = U()"
412 .ie n .IP "$check = L()" 4
413 .el .IP "\f(CW$check\fR = L()" 4
414 .IX Item "$check = L()"
415 .ie n .IP "$check = exact_ref($ref)" 4
416 .el .IP "\f(CW$check\fR = exact_ref($ref)" 4
417 .IX Item "$check = exact_ref($ref)"
418 .IP \fBend()\fR 4
419 .IX Item "end()"
420 .IP \fBetc()\fR 4
421 .IX Item "etc()"
422 .ie n .IP "filter_items { grep { ... } @_ }" 4
423 .el .IP "filter_items { grep { ... } \f(CW@_\fR }" 4
424 .IX Item "filter_items { grep { ... } @_ }"
425 .ie n .IP "$check = event $type => ..." 4
426 .el .IP "\f(CW$check\fR = event \f(CW$type\fR => ..." 4
427 .IX Item "$check = event $type => ..."
428 .ie n .IP "@checks = fail_events $type => ..." 4
429 .el .IP "\f(CW@checks\fR = fail_events \f(CW$type\fR => ..." 4
430 .IX Item "@checks = fail_events $type => ..."
431 .PD
432 .SS "CLASSIC COMPARE"
433 .IX Subsection "CLASSIC COMPARE"
434 See Test2::Tools::ClassicCompare.
435 .ie n .IP "cmp_ok($got, $op, $want, $name)" 4
436 .el .IP "cmp_ok($got, \f(CW$op\fR, \f(CW$want\fR, \f(CW$name\fR)" 4
437 .IX Item "cmp_ok($got, $op, $want, $name)"
438 .SS SUBTEST
439 .IX Subsection "SUBTEST"
440 See Test2::Tools::Subtest.
441 .ie n .IP "subtest $name => sub { ... };" 4
442 .el .IP "subtest \f(CW$name\fR => sub { ... };" 4
443 .IX Item "subtest $name => sub { ... };"
444 (Note: This is called \f(CWsubtest_buffered()\fR in the Tools module.)
445 .SS CLASS
446 .IX Subsection "CLASS"
447 See Test2::Tools::Class.
448 .ie n .IP "can_ok($thing, @methods)" 4
449 .el .IP "can_ok($thing, \f(CW@methods\fR)" 4
450 .IX Item "can_ok($thing, @methods)"
451 .PD 0
452 .ie n .IP "isa_ok($thing, @classes)" 4
453 .el .IP "isa_ok($thing, \f(CW@classes\fR)" 4
454 .IX Item "isa_ok($thing, @classes)"
455 .ie n .IP "DOES_ok($thing, @roles)" 4
456 .el .IP "DOES_ok($thing, \f(CW@roles\fR)" 4
457 .IX Item "DOES_ok($thing, @roles)"
458 .PD
459 .SS ENCODING
460 .IX Subsection "ENCODING"
461 See Test2::Tools::Encoding.
462 .IP set_encoding($encoding) 4
463 .IX Item "set_encoding($encoding)"
464 .SS EXPORTS
465 .IX Subsection "EXPORTS"
466 See Test2::Tools::Exports.
467 .IP "imported_ok(\*(Aqfunction\*(Aq, \*(Aq$scalar\*(Aq, ...)" 4
468 .IX Item "imported_ok('function', '$scalar', ...)"
469 .PD 0
470 .IP "not_imported_ok(\*(Aqfunction\*(Aq, \*(Aq$scalar\*(Aq, ...)" 4
471 .IX Item "not_imported_ok('function', '$scalar', ...)"
472 .PD
473 .SS REF
474 .IX Subsection "REF"
475 See Test2::Tools::Ref.
476 .ie n .IP "ref_ok($ref, $type)" 4
477 .el .IP "ref_ok($ref, \f(CW$type\fR)" 4
478 .IX Item "ref_ok($ref, $type)"
479 .PD 0
480 .ie n .IP "ref_is($got, $want)" 4
481 .el .IP "ref_is($got, \f(CW$want\fR)" 4
482 .IX Item "ref_is($got, $want)"
483 .ie n .IP "ref_is_not($got, $do_not_want)" 4
484 .el .IP "ref_is_not($got, \f(CW$do_not_want\fR)" 4
485 .IX Item "ref_is_not($got, $do_not_want)"
486 .PD
487 .PP
488 See Test2::Tools::Refcount.
489 .ie n .IP "is_refcount($ref, $count, $description)" 4
490 .el .IP "is_refcount($ref, \f(CW$count\fR, \f(CW$description\fR)" 4
491 .IX Item "is_refcount($ref, $count, $description)"
492 .PD 0
493 .ie n .IP "is_oneref($ref, $description)" 4
494 .el .IP "is_oneref($ref, \f(CW$description\fR)" 4
495 .IX Item "is_oneref($ref, $description)"
496 .ie n .IP "$count = refcount($ref)" 4
497 .el .IP "\f(CW$count\fR = refcount($ref)" 4
498 .IX Item "$count = refcount($ref)"
499 .PD
500 .SS MOCK
501 .IX Subsection "MOCK"
502 See Test2::Tools::Mock.
503 .ie n .IP "$control = mock ..." 4
504 .el .IP "\f(CW$control\fR = mock ..." 4
505 .IX Item "$control = mock ..."
506 .PD 0
507 .ie n .IP "$bool = mocked($thing)" 4
508 .el .IP "\f(CW$bool\fR = mocked($thing)" 4
509 .IX Item "$bool = mocked($thing)"
510 .PD
511 .SS EXCEPTION
512 .IX Subsection "EXCEPTION"
513 See Test2::Tools::Exception.
514 .ie n .IP "$exception = dies { ... }" 4
515 .el .IP "\f(CW$exception\fR = dies { ... }" 4
516 .IX Item "$exception = dies { ... }"
517 .PD 0
518 .ie n .IP "$bool = lives { ... }" 4
519 .el .IP "\f(CW$bool\fR = lives { ... }" 4
520 .IX Item "$bool = lives { ... }"
521 .ie n .IP "$bool = try_ok { ... }" 4
522 .el .IP "\f(CW$bool\fR = try_ok { ... }" 4
523 .IX Item "$bool = try_ok { ... }"
524 .PD
525 .SS WARNINGS
526 .IX Subsection "WARNINGS"
527 See Test2::Tools::Warnings.
528 .ie n .IP "$count = warns { ... }" 4
529 .el .IP "\f(CW$count\fR = warns { ... }" 4
530 .IX Item "$count = warns { ... }"
531 .PD 0
532 .ie n .IP "$warning = warning { ... }" 4
533 .el .IP "\f(CW$warning\fR = warning { ... }" 4
534 .IX Item "$warning = warning { ... }"
535 .ie n .IP "$warnings_ref = warnings { ... }" 4
536 .el .IP "\f(CW$warnings_ref\fR = warnings { ... }" 4
537 .IX Item "$warnings_ref = warnings { ... }"
538 .ie n .IP "$bool = no_warnings { ... }" 4
539 .el .IP "\f(CW$bool\fR = no_warnings { ... }" 4
540 .IX Item "$bool = no_warnings { ... }"
541 .PD
542 .SH SOURCE
543 .IX Header "SOURCE"
544 The source code repository for Test2\-Suite can be found at
545 \&\fIhttps://github.com/Test\-More/test\-more/\fR.
546 .SH MAINTAINERS
547 .IX Header "MAINTAINERS"
548 .IP "Chad Granum <[email protected]>" 4
549 .IX Item "Chad Granum <[email protected]>"
550 .SH AUTHORS
551 .IX Header "AUTHORS"
552 .IP "Chad Granum <[email protected]>" 4
553 .IX Item "Chad Granum <[email protected]>"
554 .SH COPYRIGHT
555 .IX Header "COPYRIGHT"
556 Copyright Chad Granum <[email protected]>.
557 .PP
558 This program is free software; you can redistribute it and/or
559 modify it under the same terms as Perl itself.
560 .PP
561 See \fIhttp://dev.perl.org/licenses/\fR