Debian Codegraph @

upstream/opensuse-tumbleweed/man3/Test2::Event.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::Event 3pm"
61 .TH Test2::Event 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::Event \- Base class for events
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 Base class for all event objects that get passed through
71 Test2.
72 .SH SYNOPSIS
73 .IX Header "SYNOPSIS"
74 .Vb 3
75 \& package Test2::Event::MyEvent;
76 \& use strict;
77 \& use warnings;
78 \&
79 \& # This will make our class an event subclass (required)
80 \& use base \*(AqTest2::Event\*(Aq;
81 \&
82 \& # Add some accessors (optional)
83 \& # You are not obligated to use HashBase, you can use any object tool you
84 \& # want, or roll your own accessors.
85 \& use Test2::Util::HashBase qw/foo bar baz/;
86 \&
87 \& # Use this if you want the legacy API to be written for you, for this to
88 \& # work you will need to implement a facet_data() method.
89 \& use Test2::Util::Facets2Legacy;
90 \&
91 \& # Chance to initialize some defaults
92 \& sub init {
93 \& my $self = shift;
94 \& # no other args in @_
95 \&
96 \& $self\->set_foo(\*(Aqxxx\*(Aq) unless defined $self\->foo;
97 \&
98 \& ...
99 \& }
100 \&
101 \& # This is the new way for events to convey data to the Test2 system
102 \& sub facet_data {
103 \& my $self = shift;
104 \&
105 \& # Get common facets such as \*(Aqabout\*(Aq, \*(Aqtrace\*(Aq \*(Aqamnesty\*(Aq, and \*(Aqmeta\*(Aq
106 \& my $facet_data = $self\->common_facet_data();
107 \&
108 \& # Are you making an assertion?
109 \& $facet_data\->{assert} = {pass => 1, details => \*(Aqmy assertion\*(Aq};
110 \& ...
111 \&
112 \& return $facet_data;
113 \& }
114 \&
115 \& 1;
116 .Ve
117 .SH METHODS
118 .IX Header "METHODS"
119 .SS GENERAL
120 .IX Subsection "GENERAL"
121 .ie n .IP "$trace = $e\->trace" 4
122 .el .IP "\f(CW$trace\fR = \f(CW$e\fR\->trace" 4
123 .IX Item "$trace = $e->trace"
124 Get a snapshot of the Test2::EventFacet::Trace as it was when this event was
125 generated
126 .ie n .IP "$bool_or_undef = $e\->related($e2)" 4
127 .el .IP "\f(CW$bool_or_undef\fR = \f(CW$e\fR\->related($e2)" 4
128 .IX Item "$bool_or_undef = $e->related($e2)"
129 Check if 2 events are related. In this case related means their traces share a
130 signature meaning they were created with the same context (or at the very least
131 by contexts which share an id, which is the same thing unless someone is doing
132 something very bad).
133 .Sp
134 This can be used to reliably link multiple events created by the same tool. For
135 instance a failing test like \f(CW\*(C`ok(0, "fail"\*(C'\fR will generate 2 events, one being
136 a Test2::Event::Ok, the other being a Test2::Event::Diag, both of these
137 events are related having been created under the same context and by the same
138 initial tool (though multiple tools may have been nested under the initial
139 one).
140 .Sp
141 This will return \f(CW\*(C`undef\*(C'\fR if the relationship cannot be checked, which happens
142 if either event has an incomplete or missing trace. This will return \f(CW0\fR if
143 the traces are complete, but do not match. \f(CW1\fR will be returned if there is a
144 match.
145 .ie n .IP "$e\->add_amnesty({tag => $TAG, details => $DETAILS});" 4
146 .el .IP "\f(CW$e\fR\->add_amnesty({tag => \f(CW$TAG\fR, details => \f(CW$DETAILS\fR});" 4
147 .IX Item "$e->add_amnesty({tag => $TAG, details => $DETAILS});"
148 This can be used to add amnesty to this event. Amnesty only affects failing
149 assertions in most cases, but some formatters may display them for passing
150 assertions, or even non\-assertions as well.
151 .Sp
152 Amnesty will prevent a failed assertion from causing the overall test to fail.
153 In other words it marks a failure as expected and allowed.
154 .Sp
155 \&\fBNote:\fR This is how \*(AqTODO\*(Aq is implemented under the hood. TODO is essentially
156 amnesty with the \*(AqTODO\*(Aq tag. The details are the reason for the TODO.
157 .ie n .IP "$uuid = $e\->uuid" 4
158 .el .IP "\f(CW$uuid\fR = \f(CW$e\fR\->uuid" 4
159 .IX Item "$uuid = $e->uuid"
160 If UUID tagging is enabled (See Test::API) then any event that has made its
161 way through a hub will be tagged with a UUID. A newly created event will not
162 yet be tagged in most cases.
163 .ie n .IP "$class = $e\->load_facet($name)" 4
164 .el .IP "\f(CW$class\fR = \f(CW$e\fR\->load_facet($name)" 4
165 .IX Item "$class = $e->load_facet($name)"
166 This method is used to load a facet by name (or key). It will attempt to load
167 the facet class, if it succeeds it will return the class it loaded. If it fails
168 it will return \f(CW\*(C`undef\*(C'\fR. This caches the result at the class level so that
169 future calls will be faster.
170 .Sp
171 The \f(CW$name\fR variable should be the key used to access the facet in a facets
172 hashref. For instance the assertion facet has the key \*(Aqassert\*(Aq, the information
173 facet has the \*(Aqinfo\*(Aq key, and the error facet has the key \*(Aqerrors\*(Aq. You may
174 include or omit the \*(Aqs\*(Aq at the end of the name, the method is smart enough to
175 try both the \*(Aqs\*(Aq and no\-\*(Aqs\*(Aq forms, it will check what you provided first, and
176 if that is not found it will add or strip the \*(Aqs and try again.
177 .ie n .IP "@classes = $e\->\fBFACET_TYPES()\fR" 4
178 .el .IP "\f(CW@classes\fR = \f(CW$e\fR\->\fBFACET_TYPES()\fR" 4
179 .IX Item "@classes = $e->FACET_TYPES()"
180 .PD 0
181 .ie n .IP "@classes = Test2::Event\->\fBFACET_TYPES()\fR" 4
182 .el .IP "\f(CW@classes\fR = Test2::Event\->\fBFACET_TYPES()\fR" 4
183 .IX Item "@classes = Test2::Event->FACET_TYPES()"
184 .PD
185 This returns a list of all facets that have been loaded using the
186 \&\f(CWload_facet()\fR method. This will not return any classes that have not been
187 loaded, or have been loaded directly without a call to \f(CWload_facet()\fR.
188 .Sp
189 \&\fBNote:\fR The core facet types are automatically loaded and populated in this
190 list.
191 .SS "NEW API"
192 .IX Subsection "NEW API"
193 .ie n .IP "$hashref = $e\->\fBcommon_facet_data()\fR;" 4
194 .el .IP "\f(CW$hashref\fR = \f(CW$e\fR\->\fBcommon_facet_data()\fR;" 4
195 .IX Item "$hashref = $e->common_facet_data();"
196 This can be used by subclasses to generate a starting facet data hashref. This
197 will populate the hashref with the trace, meta, amnesty, and about facets.
198 These facets are nearly always produced the same way for all events.
199 .ie n .IP "$hashref = $e\->\fBfacet_data()\fR" 4
200 .el .IP "\f(CW$hashref\fR = \f(CW$e\fR\->\fBfacet_data()\fR" 4
201 .IX Item "$hashref = $e->facet_data()"
202 If you do not override this then the default implementation will attempt to
203 generate facets from the legacy API. This generation is limited only to what
204 the legacy API can provide. It is recommended that you override this method and
205 write out explicit facet data.
206 .ie n .IP "$hashref = $e\->\fBfacets()\fR" 4
207 .el .IP "\f(CW$hashref\fR = \f(CW$e\fR\->\fBfacets()\fR" 4
208 .IX Item "$hashref = $e->facets()"
209 This takes the hashref from \f(CWfacet_data()\fR and blesses each facet into the
210 proper \f(CW\*(C`Test2::EventFacet::*\*(C'\fR subclass. If no class can be found for any given
211 facet it will be passed along unchanged.
212 .ie n .IP "@errors = $e\->\fBvalidate_facet_data()\fR;" 4
213 .el .IP "\f(CW@errors\fR = \f(CW$e\fR\->\fBvalidate_facet_data()\fR;" 4
214 .IX Item "@errors = $e->validate_facet_data();"
215 .PD 0
216 .ie n .IP "@errors = $e\->validate_facet_data(%params);" 4
217 .el .IP "\f(CW@errors\fR = \f(CW$e\fR\->validate_facet_data(%params);" 4
218 .IX Item "@errors = $e->validate_facet_data(%params);"
219 .ie n .IP "@errors = $e\->validate_facet_data(\e%facets, %params);" 4
220 .el .IP "\f(CW@errors\fR = \f(CW$e\fR\->validate_facet_data(\e%facets, \f(CW%params\fR);" 4
221 .IX Item "@errors = $e->validate_facet_data(%facets, %params);"
222 .ie n .IP "@errors = Test2::Event\->validate_facet_data(%params);" 4
223 .el .IP "\f(CW@errors\fR = Test2::Event\->validate_facet_data(%params);" 4
224 .IX Item "@errors = Test2::Event->validate_facet_data(%params);"
225 .ie n .IP "@errors = Test2::Event\->validate_facet_data(\e%facets, %params);" 4
226 .el .IP "\f(CW@errors\fR = Test2::Event\->validate_facet_data(\e%facets, \f(CW%params\fR);" 4
227 .IX Item "@errors = Test2::Event->validate_facet_data(%facets, %params);"
228 .PD
229 This method will validate facet data and return a list of errors. If no errors
230 are found this will return an empty list.
231 .Sp
232 This can be called as an object method with no arguments, in which case the
233 \&\f(CWfacet_data()\fR method will be called to get the facet data to be validated.
234 .Sp
235 When used as an object method the \f(CW\*(C`\e%facet_data\*(C'\fR argument may be omitted.
236 .Sp
237 When used as a class method the \f(CW\*(C`\e%facet_data\*(C'\fR argument is required.
238 .Sp
239 Remaining arguments will be slurped into a \f(CW%params\fR hash.
240 .Sp
241 Currently only 1 parameter is defined:
242 .RS 4
243 .ie n .IP "require_facet_class => $BOOL" 4
244 .el .IP "require_facet_class => \f(CW$BOOL\fR" 4
245 .IX Item "require_facet_class => $BOOL"
246 When set to true (default is false) this will reject any facets where a facet
247 class cannot be found. Normally facets without classes are assumed to be custom
248 and are ignored.
249 .RE
250 .RS 4
251 .RE
252 .PP
253 \fIWHAT ARE FACETS?\fR
254 .IX Subsection "WHAT ARE FACETS?"
255 .PP
256 Facets are how events convey their purpose to the Test2 internals and
257 formatters. An event without facets will have no intentional effect on the
258 overall test state, and will not be displayed at all by most formatters, except
259 perhaps to say that an event of an unknown type was seen.
260 .PP
261 Facets are produced by the \f(CWfacet_data()\fR subroutine, which you should
262 nearly\-always override. \f(CWfacet_data()\fR is expected to return a hashref where
263 each key is the facet type, and the value is either a hashref with the data for
264 that facet, or an array of hashrefs. Some facets must be defined as single
265 hashrefs, some must be defined as an array of hashrefs, No facets allow both.
266 .PP
267 \&\f(CWfacet_data()\fR \fBMUST NOT\fR bless the data it returns, the main hashref, and
268 nested facet hashrefs \fBMUST\fR be bare, though items contained within each
269 facet may be blessed. The data returned by this method \fBshould\fR also be copies
270 of the internal data in order to prevent accidental state modification.
271 .PP
272 \&\f(CWfacets()\fR takes the data from \f(CWfacet_data()\fR and blesses it into the
273 \&\f(CW\*(C`Test2::EventFacet::*\*(C'\fR packages. This is rarely used however, the EventFacet
274 packages are primarily for convenience and documentation. The EventFacet
275 classes are not used at all internally, instead the raw data is used.
276 .PP
277 Here is a list of facet types by package. The packages are not used internally,
278 but are where the documentation for each type is kept.
279 .PP
280 \&\fBNote:\fR Every single facet type has the \f(CW\*(Aqdetails\*(Aq\fR field. This field is
281 always intended for human consumption, and when provided, should explain the
282 \&\*(Aqwhy\*(Aq for the facet. All other fields are facet specific.
283 .IP "about => {...}" 4
284 .IX Item "about => {...}"
285 Test2::EventFacet::About
286 .Sp
287 This contains information about the event itself such as the event package
288 name. The \f(CW\*(C`details\*(C'\fR field for this facet is an overall summary of the event.
289 .IP "assert => {...}" 4
290 .IX Item "assert => {...}"
291 Test2::EventFacet::Assert
292 .Sp
293 This facet is used if an assertion was made. The \f(CW\*(C`details\*(C'\fR field of this facet
294 is the description of the assertion.
295 .IP "control => {...}" 4
296 .IX Item "control => {...}"
297 Test2::EventFacet::Control
298 .Sp
299 This facet is used to tell the Test2::Event::Hub about special actions the
300 event causes. Things like halting all testing, terminating the current test,
301 etc. In this facet the \f(CW\*(C`details\*(C'\fR field explains why any special action was
302 taken.
303 .Sp
304 \&\fBNote:\fR This is how bail\-out is implemented.
305 .IP "meta => {...}" 4
306 .IX Item "meta => {...}"
307 Test2::EventFacet::Meta
308 .Sp
309 The meta facet contains all the meta\-data attached to the event. In this case
310 the \f(CW\*(C`details\*(C'\fR field has no special meaning, but may be present if something
311 sets the \*(Aqdetails\*(Aq meta\-key on the event.
312 .IP "parent => {...}" 4
313 .IX Item "parent => {...}"
314 Test2::EventFacet::Parent
315 .Sp
316 This facet contains nested events and similar details for subtests. In this
317 facet the \f(CW\*(C`details\*(C'\fR field will typically be the name of the subtest.
318 .IP "plan => {...}" 4
319 .IX Item "plan => {...}"
320 Test2::EventFacet::Plan
321 .Sp
322 This facet tells the system that a plan has been set. The \f(CW\*(C`details\*(C'\fR field of
323 this is usually left empty, but when present explains why the plan is what it
324 is, this is most useful if the plan is to skip\-all.
325 .IP "trace => {...}" 4
326 .IX Item "trace => {...}"
327 Test2::EventFacet::Trace
328 .Sp
329 This facet contains information related to when and where the event was
330 generated. This is how the test file and line number of a failure is known.
331 This facet can also help you to tell if tests are related.
332 .Sp
333 In this facet the \f(CW\*(C`details\*(C'\fR field overrides the "failed at test_file.t line
334 42." message provided on assertion failure.
335 .IP "amnesty => [{...}, ...]" 4
336 .IX Item "amnesty => [{...}, ...]"
337 Test2::EventFacet::Amnesty
338 .Sp
339 The amnesty facet is a list instead of a single item, this is important as
340 amnesty can come from multiple places at once.
341 .Sp
342 For each instance of amnesty the \f(CW\*(C`details\*(C'\fR field explains why amnesty was
343 granted.
344 .Sp
345 \&\fBNote:\fR Outside of formatters amnesty only acts to forgive a failing
346 assertion.
347 .IP "errors => [{...}, ...]" 4
348 .IX Item "errors => [{...}, ...]"
349 Test2::EventFacet::Error
350 .Sp
351 The errors facet is a list instead of a single item, any number of errors can
352 be listed. In this facet \f(CW\*(C`details\*(C'\fR describes the error, or may contain the raw
353 error message itself (such as an exception). In perl exception may be blessed
354 objects, as such the raw data for this facet may contain nested items which are
355 blessed.
356 .Sp
357 Not all errors are considered fatal, there is a \f(CW\*(C`fail\*(C'\fR field that must be set
358 for an error to cause the test to fail.
359 .Sp
360 \&\fBNote:\fR This facet is unique in that the field name is \*(Aqerrors\*(Aq while the
361 package is \*(AqError\*(Aq. This is because this is the only facet type that is both a
362 list, and has a name where the plural is not the same as the singular. This may
363 cause some confusion, but I feel it will be less confusing than the
364 alternative.
365 .IP "info => [{...}, ...]" 4
366 .IX Item "info => [{...}, ...]"
367 Test2::EventFacet::Info
368 .Sp
369 The \*(Aqinfo\*(Aq facet is a list instead of a single item, any quantity of extra
370 information can be attached to an event. Some information may be critical
371 diagnostics, others may be simply commentary in nature, this is determined by
372 the \f(CW\*(C`debug\*(C'\fR flag.
373 .Sp
374 For this facet the \f(CW\*(C`details\*(C'\fR flag is the info itself. This info may be a
375 string, or it may be a data structure to display. This is one of the few facet
376 types that may contain blessed items.
377 .SS "LEGACY API"
378 .IX Subsection "LEGACY API"
379 .ie n .IP "$bool = $e\->causes_fail" 4
380 .el .IP "\f(CW$bool\fR = \f(CW$e\fR\->causes_fail" 4
381 .IX Item "$bool = $e->causes_fail"
382 Returns true if this event should result in a test failure. In general this
383 should be false.
384 .ie n .IP "$bool = $e\->increments_count" 4
385 .el .IP "\f(CW$bool\fR = \f(CW$e\fR\->increments_count" 4
386 .IX Item "$bool = $e->increments_count"
387 Should be true if this event should result in a test count increment.
388 .ie n .IP $e\->callback($hub) 4
389 .el .IP \f(CW$e\fR\->callback($hub) 4
390 .IX Item "$e->callback($hub)"
391 If your event needs to have extra effects on the Test2::Hub you can override
392 this method.
393 .Sp
394 This is called \fBBEFORE\fR your event is passed to the formatter.
395 .ie n .IP "$num = $e\->nested" 4
396 .el .IP "\f(CW$num\fR = \f(CW$e\fR\->nested" 4
397 .IX Item "$num = $e->nested"
398 If this event is nested inside of other events, this should be the depth of
399 nesting. (This is mainly for subtests)
400 .ie n .IP "$bool = $e\->global" 4
401 .el .IP "\f(CW$bool\fR = \f(CW$e\fR\->global" 4
402 .IX Item "$bool = $e->global"
403 Set this to true if your event is global, that is ALL threads and processes
404 should see it no matter when or where it is generated. This is not a common
405 thing to want, it is used by bail\-out and skip_all to end testing.
406 .ie n .IP "$code = $e\->terminate" 4
407 .el .IP "\f(CW$code\fR = \f(CW$e\fR\->terminate" 4
408 .IX Item "$code = $e->terminate"
409 This is called \fBAFTER\fR your event has been passed to the formatter. This
410 should normally return undef, only change this if your event should cause the
411 test to exit immediately.
412 .Sp
413 If you want this event to cause the test to exit you should return the exit
414 code here. Exit code of 0 means exit success, any other integer means exit with
415 failure.
416 .Sp
417 This is used by Test2::Event::Plan to exit 0 when the plan is
418 \&\*(Aqskip_all\*(Aq. This is also used by Test2::Event:Bail to force the test
419 to exit with a failure.
420 .Sp
421 This is called after the event has been sent to the formatter in order to
422 ensure the event is seen and understood.
423 .ie n .IP "$msg = $e\->summary" 4
424 .el .IP "\f(CW$msg\fR = \f(CW$e\fR\->summary" 4
425 .IX Item "$msg = $e->summary"
426 This is intended to be a human readable summary of the event. This should
427 ideally only be one line long, but you can use multiple lines if necessary. This
428 is intended for human consumption. You do not need to make it easy for machines
429 to understand.
430 .Sp
431 The default is to simply return the event package name.
432 .ie n .IP "($count, $directive, $reason) = $e\->\fBsets_plan()\fR" 4
433 .el .IP "($count, \f(CW$directive\fR, \f(CW$reason\fR) = \f(CW$e\fR\->\fBsets_plan()\fR" 4
434 .IX Item "($count, $directive, $reason) = $e->sets_plan()"
435 Check if this event sets the testing plan. It will return an empty list if it
436 does not. If it does set the plan it will return a list of 1 to 3 items in
437 order: Expected Test Count, Test Directive, Reason for directive.
438 .ie n .IP "$bool = $e\->diagnostics" 4
439 .el .IP "\f(CW$bool\fR = \f(CW$e\fR\->diagnostics" 4
440 .IX Item "$bool = $e->diagnostics"
441 True if the event contains diagnostics info. This is useful because a
442 non\-verbose harness may choose to hide events that are not in this category.
443 Some formatters may choose to send these to STDERR instead of STDOUT to ensure
444 they are seen.
445 .ie n .IP "$bool = $e\->no_display" 4
446 .el .IP "\f(CW$bool\fR = \f(CW$e\fR\->no_display" 4
447 .IX Item "$bool = $e->no_display"
448 False by default. This will return true on events that should not be displayed
449 by formatters.
450 .ie n .IP "$id = $e\->in_subtest" 4
451 .el .IP "\f(CW$id\fR = \f(CW$e\fR\->in_subtest" 4
452 .IX Item "$id = $e->in_subtest"
453 If the event is inside a subtest this should have the subtest ID.
454 .ie n .IP "$id = $e\->subtest_id" 4
455 .el .IP "\f(CW$id\fR = \f(CW$e\fR\->subtest_id" 4
456 .IX Item "$id = $e->subtest_id"
457 If the event is a final subtest event, this should contain the subtest ID.
458 .SH "THIRD PARTY META\-DATA"
459 .IX Header "THIRD PARTY META-DATA"
460 This object consumes Test2::Util::ExternalMeta which provides a consistent
461 way for you to attach meta\-data to instances of this class. This is useful for
462 tools, plugins, and other extensions.
463 .SH SOURCE
464 .IX Header "SOURCE"
465 The source code repository for Test2 can be found at
466 <https://github.com/Test\-More/test\-more/>.
467 .SH MAINTAINERS
468 .IX Header "MAINTAINERS"
469 .IP "Chad Granum <[email protected]>" 4
470 .IX Item "Chad Granum <[email protected]>"
471 .SH AUTHORS
472 .IX Header "AUTHORS"
473 .IP "Chad Granum <[email protected]>" 4
474 .IX Item "Chad Granum <[email protected]>"
475 .SH COPYRIGHT
476 .IX Header "COPYRIGHT"
477 Copyright Chad Granum <[email protected]>.
478 .PP
479 This program is free software; you can redistribute it and/or
480 modify it under the same terms as Perl itself.
481 .PP
482 See <https://dev.perl.org/licenses/>