Linux server.nvwebsoft.co.in 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
Apache
: 162.240.12.249 | : 52.15.42.61
202 Domain
8.1.31
nbspublicschool
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
local /
share /
man /
man3 /
[ HOME SHELL ]
Name
Size
Permission
Action
App::cpanminus.3pm
14.28
KB
-r--r--r--
App::cpanminus::fatscript.3pm
26.28
KB
-r--r--r--
Bundle::DBD::mysql.3pm
4.09
KB
-r--r--r--
CPAN::Meta::Requirements.3pm
13.78
KB
-r--r--r--
CPAN::Meta::YAML.3pm
5.89
KB
-r--r--r--
Canary::Stability.3pm
5.84
KB
-r--r--r--
DBD::mysql.3pm
48.68
KB
-r--r--r--
DBD::mysql::INSTALL.3pm
30.13
KB
-r--r--r--
Data::Dump.3pm
10.51
KB
-r--r--r--
Data::Dump::Filtered.3pm
10.39
KB
-r--r--r--
Data::Dump::Trace.3pm
9
KB
-r--r--r--
Data::Validate::IP.3pm
15.68
KB
-r--r--r--
Devel::CheckLib.3pm
11.45
KB
-r--r--r--
Digest::MD5.3pm
16.16
KB
-r--r--r--
Error.3pm
21.39
KB
-r--r--r--
Error::Simple.3pm
8.15
KB
-r--r--r--
Expect.3pm
60.58
KB
-r--r--r--
Exporter.3pm
22.74
KB
-r--r--r--
Exporter::Heavy.3pm
4.1
KB
-r--r--r--
File::Copy::Recursive.3pm
18.63
KB
-r--r--r--
File::LckPwdF.3pm
11.21
KB
-r--r--r--
File::Path.3pm
32.74
KB
-r--r--r--
File::ReadBackwards.3pm
10.38
KB
-r--r--r--
File::Temp.3pm
39.49
KB
-r--r--r--
HTML::TagParser.3pm
14.01
KB
-r--r--r--
HTTP::Date.3pm
9.36
KB
-r--r--r--
HTTP::Tiny.3pm
29.24
KB
-r--r--r--
IO::AtomicFile.3pm
7.02
KB
-r--r--r--
IO::InnerFile.3pm
7.66
KB
-r--r--r--
IO::Lines.3pm
5.46
KB
-r--r--r--
IO::Pty.3pm
10.14
KB
-r--r--r--
IO::Scalar.3pm
12.19
KB
-r--r--r--
IO::ScalarArray.3pm
12.04
KB
-r--r--r--
IO::Stringy.3pm
5.72
KB
-r--r--r--
IO::Tty.3pm
9.91
KB
-r--r--r--
IO::Tty::Constant.3pm
11.25
KB
-r--r--r--
IO::Wrap.3pm
12.18
KB
-r--r--r--
IO::WrapTie.3pm
16.4
KB
-r--r--r--
JSON.3pm
64.46
KB
-r--r--r--
JSON::Syck.3pm
9.67
KB
-r--r--r--
JSON::XS.3pm
88.67
KB
-r--r--r--
JSON::XS::Boolean.3pm
4.55
KB
-r--r--r--
JSON::backportPP.3pm
65.09
KB
-r--r--r--
JSON::backportPP::Boolean.3pm
4.52
KB
-r--r--r--
JSON::backportPP::Compat5005.3...
4.39
KB
-r--r--r--
JSON::backportPP::Compat5006.3...
4.39
KB
-r--r--r--
Mail::RFC822::Address.3pm
7.11
KB
-r--r--r--
Mock::Config.3pm
7.73
KB
-r--r--r--
Module::Load.3pm
11.18
KB
-r--r--r--
Module::Load::Conditional.3pm
14.24
KB
-r--r--r--
NetAddr::IP.3pm
38.15
KB
-r--r--r--
NetAddr::IP::InetBase.3pm
14.65
KB
-r--r--r--
NetAddr::IP::Lite.3pm
26.89
KB
-r--r--r--
NetAddr::IP::Util.3pm
23.49
KB
-r--r--r--
NetAddr::IP::UtilPP.3pm
11.04
KB
-r--r--r--
POD2::DE::local::lib.3pm
24.23
KB
-r--r--r--
POD2::PT_BR::local::lib.3pm
24.62
KB
-r--r--r--
Path::Tiny.3pm
52.88
KB
-r--r--r--
Storable.3pm
45.41
KB
-r--r--r--
Template::Toolkit::Simple.3pm
13.37
KB
-r--r--r--
Test2.3pm
11.13
KB
-r--r--r--
Test2::API.3pm
37.22
KB
-r--r--r--
Test2::API::Breakage.3pm
6.63
KB
-r--r--r--
Test2::API::Context.3pm
25.52
KB
-r--r--r--
Test2::API::Instance.3pm
14.72
KB
-r--r--r--
Test2::API::InterceptResult.3p...
22
KB
-r--r--r--
Test2::API::InterceptResult::E...
26.72
KB
-r--r--r--
Test2::API::InterceptResult::H...
4.64
KB
-r--r--r--
Test2::API::InterceptResult::S...
4.77
KB
-r--r--r--
Test2::API::Stack.3pm
8.18
KB
-r--r--r--
Test2::Event.3pm
22.81
KB
-r--r--r--
Test2::Event::Bail.3pm
5.15
KB
-r--r--r--
Test2::Event::Diag.3pm
5.02
KB
-r--r--r--
Test2::Event::Encoding.3pm
5.36
KB
-r--r--r--
Test2::Event::Exception.3pm
5.3
KB
-r--r--r--
Test2::Event::Fail.3pm
4.93
KB
-r--r--r--
Test2::Event::Generic.3pm
9.66
KB
-r--r--r--
Test2::Event::Note.3pm
5.01
KB
-r--r--r--
Test2::Event::Ok.3pm
5.69
KB
-r--r--r--
Test2::Event::Pass.3pm
4.93
KB
-r--r--r--
Test2::Event::Plan.3pm
5.58
KB
-r--r--r--
Test2::Event::Skip.3pm
5.34
KB
-r--r--r--
Test2::Event::Subtest.3pm
5.25
KB
-r--r--r--
Test2::Event::TAP::Version.3pm
5.18
KB
-r--r--r--
Test2::Event::V2.3pm
8.26
KB
-r--r--r--
Test2::Event::Waiting.3pm
4.8
KB
-r--r--r--
Test2::EventFacet.3pm
5.57
KB
-r--r--r--
Test2::EventFacet::About.3pm
6.37
KB
-r--r--r--
Test2::EventFacet::Amnesty.3pm
6.16
KB
-r--r--r--
Test2::EventFacet::Assert.3pm
6.41
KB
-r--r--r--
Test2::EventFacet::Control.3pm
7.4
KB
-r--r--r--
Test2::EventFacet::Error.3pm
6.26
KB
-r--r--r--
Test2::EventFacet::Hub.3pm
7.12
KB
-r--r--r--
Test2::EventFacet::Info.3pm
8.17
KB
-r--r--r--
Test2::EventFacet::Info::Table...
7.16
KB
-r--r--r--
Test2::EventFacet::Meta.3pm
5.22
KB
-r--r--r--
Test2::EventFacet::Parent.3pm
6.31
KB
-r--r--r--
Test2::EventFacet::Plan.3pm
6.67
KB
-r--r--r--
Test2::EventFacet::Render.3pm
6.84
KB
-r--r--r--
Test2::EventFacet::Trace.3pm
12.58
KB
-r--r--r--
Test2::Formatter.3pm
7.9
KB
-r--r--r--
Test2::Formatter::TAP.3pm
6.38
KB
-r--r--r--
Test2::Hub.3pm
18.36
KB
-r--r--r--
Test2::Hub::Interceptor.3pm
4.63
KB
-r--r--r--
Test2::Hub::Interceptor::Termi...
4.67
KB
-r--r--r--
Test2::Hub::Subtest.3pm
5.48
KB
-r--r--r--
Test2::IPC.3pm
5.18
KB
-r--r--r--
Test2::IPC::Driver.3pm
10.51
KB
-r--r--r--
Test2::IPC::Driver::Files.3pm
5.49
KB
-r--r--r--
Test2::Tools::Tiny.3pm
8.45
KB
-r--r--r--
Test2::Transition.3pm
19.71
KB
-r--r--r--
Test2::Util.3pm
9.42
KB
-r--r--r--
Test2::Util::ExternalMeta.3pm
7.22
KB
-r--r--r--
Test2::Util::Facets2Legacy.3pm
9.88
KB
-r--r--r--
Test2::Util::HashBase.3pm
13.91
KB
-r--r--r--
Test2::Util::Trace.3pm
4.74
KB
-r--r--r--
Test::Builder.3pm
28.79
KB
-r--r--r--
Test::Builder::Formatter.3pm
4.85
KB
-r--r--r--
Test::Builder::IO::Scalar.3pm
11.27
KB
-r--r--r--
Test::Builder::Module.3pm
7.35
KB
-r--r--r--
Test::Builder::Tester.3pm
13.04
KB
-r--r--r--
Test::Builder::Tester::Color.3...
4.82
KB
-r--r--r--
Test::Builder::TodoDiag.3pm
4.82
KB
-r--r--r--
Test::Deep.3pm
47.56
KB
-r--r--r--
Test::Deep::NoTest.3pm
4.33
KB
-r--r--r--
Test::Fatal.3pm
10.69
KB
-r--r--r--
Test::File.3pm
23.7
KB
-r--r--r--
Test::More.3pm
43.96
KB
-r--r--r--
Test::Needs.3pm
7.27
KB
-r--r--r--
Test::Requires.3pm
5.93
KB
-r--r--r--
Test::Simple.3pm
10.67
KB
-r--r--r--
Test::Tester.3pm
17.76
KB
-r--r--r--
Test::Tester::Capture.3pm
4.59
KB
-r--r--r--
Test::Tester::CaptureRunner.3p...
4.37
KB
-r--r--r--
Test::Tutorial.3pm
25.46
KB
-r--r--r--
Test::Warnings.3pm
15.7
KB
-r--r--r--
Test::use::ok.3pm
5.52
KB
-r--r--r--
Text::Aligner.3pm
9.77
KB
-r--r--r--
Text::Table.3pm
27.18
KB
-r--r--r--
Time::Local.3pm
15.63
KB
-r--r--r--
Try::Tiny.3pm
22.09
KB
-r--r--r--
URI.3pm
40.31
KB
-r--r--r--
URI::Escape.3pm
9.58
KB
-r--r--r--
URI::Heuristic.3pm
6.84
KB
-r--r--r--
URI::QueryParam.3pm
8.26
KB
-r--r--r--
URI::Split.3pm
5.73
KB
-r--r--r--
URI::URL.3pm
6.19
KB
-r--r--r--
URI::WithBase.3pm
5.91
KB
-r--r--r--
URI::_punycode.3pm
6.32
KB
-r--r--r--
URI::data.3pm
5.98
KB
-r--r--r--
URI::file.3pm
12.16
KB
-r--r--r--
URI::ldap.3pm
7.36
KB
-r--r--r--
YAML::LibYAML.3pm
4.51
KB
-r--r--r--
YAML::Syck.3pm
12.34
KB
-r--r--r--
YAML::XS.3pm
9.57
KB
-r--r--r--
YAML::XS::LibYAML.3pm
3.99
KB
-r--r--r--
lib::core::only.3pm
7.28
KB
-r--r--r--
local::lib.3pm
32.78
KB
-r--r--r--
ok.3pm
4.55
KB
-r--r--r--
version.3pm
15.37
KB
-r--r--r--
version::Internals.3pm
31.34
KB
-r--r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Test2::Hub.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 turned on, 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Test2::Hub 3" .TH Test2::Hub 3 "2022-03-04" "perl v5.16.3" "User Contributed Perl Documentation" .\" 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" Test2::Hub \- The conduit through which all events flow. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Test2::Hub; \& \& my $hub = Test2::Hub\->new(); \& $hub\->send(...); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The hub is the place where all events get processed and handed off to the formatter. The hub also tracks test state, and provides several hooks into the event pipeline. .SH "COMMON TASKS" .IX Header "COMMON TASKS" .SS "\s-1SENDING EVENTS\s0" .IX Subsection "SENDING EVENTS" .Vb 1 \& $hub\->send($event) .Ve .PP The \f(CW\*(C`send()\*(C'\fR method is used to issue an event to the hub. This method will handle thread/fork sync, filters, listeners, \s-1TAP\s0 output, etc. .SS "\s-1ALTERING OR REMOVING EVENTS\s0" .IX Subsection "ALTERING OR REMOVING EVENTS" You can use either \f(CW\*(C`filter()\*(C'\fR or \f(CW\*(C`pre_filter()\*(C'\fR, depending on your needs. Both have identical syntax, so only \f(CW\*(C`filter()\*(C'\fR is shown here. .PP .Vb 2 \& $hub\->filter(sub { \& my ($hub, $event) = @_; \& \& my $action = get_action($event); \& \& # No action should be taken \& return $event if $action eq \*(Aqnone\*(Aq; \& \& # You want your filter to remove the event \& return undef if $action eq \*(Aqdelete\*(Aq; \& \& if ($action eq \*(Aqdo_it\*(Aq) { \& my $new_event = copy_event($event); \& ... Change your copy of the event ... \& return $new_event; \& } \& \& die "Should not happen"; \& }); .Ve .PP By default, filters are not inherited by child hubs. That means if you start a subtest, the subtest will not inherit the filter. You can change this behavior with the \f(CW\*(C`inherit\*(C'\fR parameter: .PP .Vb 1 \& $hub\->filter(sub { ... }, inherit => 1); .Ve .SS "\s-1LISTENING FOR EVENTS\s0" .IX Subsection "LISTENING FOR EVENTS" .Vb 2 \& $hub\->listen(sub { \& my ($hub, $event, $number) = @_; \& \& ... do whatever you want with the event ... \& \& # return is ignored \& }); .Ve .PP By default listeners are not inherited by child hubs. That means if you start a subtest, the subtest will not inherit the listener. You can change this behavior with the \f(CW\*(C`inherit\*(C'\fR parameter: .PP .Vb 1 \& $hub\->listen(sub { ... }, inherit => 1); .Ve .SS "POST-TEST \s-1BEHAVIORS\s0" .IX Subsection "POST-TEST BEHAVIORS" .Vb 2 \& $hub\->follow_up(sub { \& my ($trace, $hub) = @_; \& \& ... do whatever you need to ... \& \& # Return is ignored \& }); .Ve .PP follow_up subs are called only once, either when done_testing is called, or in an \s-1END\s0 block. .SS "\s-1SETTING THE FORMATTER\s0" .IX Subsection "SETTING THE FORMATTER" By default an instance of Test2::Formatter::TAP is created and used. .PP .Vb 1 \& my $old = $hub\->format(My::Formatter\->new); .Ve .PP Setting the formatter will \s-1REPLACE\s0 any existing formatter. You may set the formatter to undef to prevent output. The old formatter will be returned if one was already set. Only one formatter is allowed at a time. .SH "METHODS" .IX Header "METHODS" .ie n .IP "$hub\->send($event)" 4 .el .IP "\f(CW$hub\fR\->send($event)" 4 .IX Item "$hub->send($event)" This is where all events enter the hub for processing. .ie n .IP "$hub\->process($event)" 4 .el .IP "\f(CW$hub\fR\->process($event)" 4 .IX Item "$hub->process($event)" This is called by send after it does any \s-1IPC\s0 handling. You can use this to bypass the \s-1IPC\s0 process, but in general you should avoid using this. .ie n .IP "$old = $hub\->format($formatter)" 4 .el .IP "\f(CW$old\fR = \f(CW$hub\fR\->format($formatter)" 4 .IX Item "$old = $hub->format($formatter)" Replace the existing formatter instance with a new one. Formatters must be objects that implement a \f(CW\*(C`$formatter\->write($event)\*(C'\fR method. .ie n .IP "$sub = $hub\->listen(sub { ... }, %optional_params)" 4 .el .IP "\f(CW$sub\fR = \f(CW$hub\fR\->listen(sub { ... }, \f(CW%optional_params\fR)" 4 .IX Item "$sub = $hub->listen(sub { ... }, %optional_params)" You can use this to record all events \s-1AFTER\s0 they have been sent to the formatter. No changes made here will be meaningful, except possibly to other listeners. .Sp .Vb 2 \& $hub\->listen(sub { \& my ($hub, $event, $number) = @_; \& \& ... do whatever you want with the event ... \& \& # return is ignored \& }); .Ve .Sp Normally listeners are not inherited by child hubs such as subtests. You can add the \f(CW\*(C`inherit => 1\*(C'\fR parameter to allow a listener to be inherited. .ie n .IP "$hub\->unlisten($sub)" 4 .el .IP "\f(CW$hub\fR\->unlisten($sub)" 4 .IX Item "$hub->unlisten($sub)" You can use this to remove a listen callback. You must pass in the coderef returned by the \f(CW\*(C`listen()\*(C'\fR method. .ie n .IP "$sub = $hub\->filter(sub { ... }, %optional_params)" 4 .el .IP "\f(CW$sub\fR = \f(CW$hub\fR\->filter(sub { ... }, \f(CW%optional_params\fR)" 4 .IX Item "$sub = $hub->filter(sub { ... }, %optional_params)" .PD 0 .ie n .IP "$sub = $hub\->pre_filter(sub { ... }, %optional_params)" 4 .el .IP "\f(CW$sub\fR = \f(CW$hub\fR\->pre_filter(sub { ... }, \f(CW%optional_params\fR)" 4 .IX Item "$sub = $hub->pre_filter(sub { ... }, %optional_params)" .PD These can be used to add filters. Filters can modify, replace, or remove events before anything else can see them. .Sp .Vb 3 \& $hub\->filter( \& sub { \& my ($hub, $event) = @_; \& \& return $event; # No Changes \& return; # Remove the event \& \& # Or you can modify an event before returning it. \& $event\->modify; \& return $event; \& } \& ); .Ve .Sp If you are not using threads, forking, or \s-1IPC\s0 then the only difference between a \f(CW\*(C`filter\*(C'\fR and a \f(CW\*(C`pre_filter\*(C'\fR is that \f(CW\*(C`pre_filter\*(C'\fR subs run first. When you are using threads, forking, or \s-1IPC,\s0 pre_filters happen to events before they are sent to their destination proc/thread, ordinary filters happen only in the destination hub/thread. .Sp You cannot add a regular filter to a hub if the hub was created in another process or thread. You can always add a pre_filter. .ie n .IP "$hub\->unfilter($sub)" 4 .el .IP "\f(CW$hub\fR\->unfilter($sub)" 4 .IX Item "$hub->unfilter($sub)" .PD 0 .ie n .IP "$hub\->pre_unfilter($sub)" 4 .el .IP "\f(CW$hub\fR\->pre_unfilter($sub)" 4 .IX Item "$hub->pre_unfilter($sub)" .PD These can be used to remove filters and pre_filters. The \f(CW$sub\fR argument is the reference returned by \f(CW\*(C`filter()\*(C'\fR or \f(CW\*(C`pre_filter()\*(C'\fR. .ie n .IP "$hub\->follow_op(sub { ... })" 4 .el .IP "\f(CW$hub\fR\->follow_op(sub { ... })" 4 .IX Item "$hub->follow_op(sub { ... })" Use this to add behaviors that are called just before the hub is finalized. The only argument to your codeblock will be a Test2::EventFacet::Trace instance. .Sp .Vb 2 \& $hub\->follow_up(sub { \& my ($trace, $hub) = @_; \& \& ... do whatever you need to ... \& \& # Return is ignored \& }); .Ve .Sp follow_up subs are called only once, ether when done_testing is called, or in an \s-1END\s0 block. .ie n .IP "$sub = $hub\->add_context_acquire(sub { ... });" 4 .el .IP "\f(CW$sub\fR = \f(CW$hub\fR\->add_context_acquire(sub { ... });" 4 .IX Item "$sub = $hub->add_context_acquire(sub { ... });" Add a callback that will be called every time someone tries to acquire a context. It gets a single argument, a reference of the hash of parameters being used the construct the context. This is your chance to change the parameters by directly altering the hash. .Sp .Vb 4 \& test2_add_callback_context_acquire(sub { \& my $params = shift; \& $params\->{level}++; \& }); .Ve .Sp This is a very scary \s-1API\s0 function. Please do not use this unless you need to. This is here for Test::Builder and backwards compatibility. This has you directly manipulate the hash instead of returning a new one for performance reasons. .Sp \&\fBNote\fR Using this hook could have a huge performance impact. .Sp The coderef you provide is returned and can be used to remove the hook later. .ie n .IP "$hub\->remove_context_acquire($sub);" 4 .el .IP "\f(CW$hub\fR\->remove_context_acquire($sub);" 4 .IX Item "$hub->remove_context_acquire($sub);" This can be used to remove a context acquire hook. .ie n .IP "$sub = $hub\->add_context_init(sub { ... });" 4 .el .IP "\f(CW$sub\fR = \f(CW$hub\fR\->add_context_init(sub { ... });" 4 .IX Item "$sub = $hub->add_context_init(sub { ... });" This allows you to add callbacks that will trigger every time a new context is created for the hub. The only argument to the sub will be the Test2::API::Context instance that was created. .Sp \&\fBNote\fR Using this hook could have a huge performance impact. .Sp The coderef you provide is returned and can be used to remove the hook later. .ie n .IP "$hub\->remove_context_init($sub);" 4 .el .IP "\f(CW$hub\fR\->remove_context_init($sub);" 4 .IX Item "$hub->remove_context_init($sub);" This can be used to remove a context init hook. .ie n .IP "$sub = $hub\->add_context_release(sub { ... });" 4 .el .IP "\f(CW$sub\fR = \f(CW$hub\fR\->add_context_release(sub { ... });" 4 .IX Item "$sub = $hub->add_context_release(sub { ... });" This allows you to add callbacks that will trigger every time a context for this hub is released. The only argument to the sub will be the Test2::API::Context instance that was released. These will run in reverse order. .Sp \&\fBNote\fR Using this hook could have a huge performance impact. .Sp The coderef you provide is returned and can be used to remove the hook later. .ie n .IP "$hub\->remove_context_release($sub);" 4 .el .IP "\f(CW$hub\fR\->remove_context_release($sub);" 4 .IX Item "$hub->remove_context_release($sub);" This can be used to remove a context release hook. .ie n .IP "$hub\->\fIcull()\fR" 4 .el .IP "\f(CW$hub\fR\->\fIcull()\fR" 4 .IX Item "$hub->cull()" Cull any \s-1IPC\s0 events (and process them). .ie n .IP "$pid = $hub\->\fIpid()\fR" 4 .el .IP "\f(CW$pid\fR = \f(CW$hub\fR\->\fIpid()\fR" 4 .IX Item "$pid = $hub->pid()" Get the process id under which the hub was created. .ie n .IP "$tid = $hub\->\fItid()\fR" 4 .el .IP "\f(CW$tid\fR = \f(CW$hub\fR\->\fItid()\fR" 4 .IX Item "$tid = $hub->tid()" Get the thread id under which the hub was created. .ie n .IP "$hud = $hub\->\fIhid()\fR" 4 .el .IP "\f(CW$hud\fR = \f(CW$hub\fR\->\fIhid()\fR" 4 .IX Item "$hud = $hub->hid()" Get the identifier string of the hub. .ie n .IP "$uuid = $hub\->\fIuuid()\fR" 4 .el .IP "\f(CW$uuid\fR = \f(CW$hub\fR\->\fIuuid()\fR" 4 .IX Item "$uuid = $hub->uuid()" If \s-1UUID\s0 tagging is enabled (see Test2::API) then the hub will have a \s-1UUID.\s0 .ie n .IP "$ipc = $hub\->\fIipc()\fR" 4 .el .IP "\f(CW$ipc\fR = \f(CW$hub\fR\->\fIipc()\fR" 4 .IX Item "$ipc = $hub->ipc()" Get the \s-1IPC\s0 object used by the hub. .ie n .IP "$hub\->set_no_ending($bool)" 4 .el .IP "\f(CW$hub\fR\->set_no_ending($bool)" 4 .IX Item "$hub->set_no_ending($bool)" .PD 0 .ie n .IP "$bool = $hub\->no_ending" 4 .el .IP "\f(CW$bool\fR = \f(CW$hub\fR\->no_ending" 4 .IX Item "$bool = $hub->no_ending" .PD This can be used to disable auto-ending behavior for a hub. The auto-ending behavior is triggered by an end block and is used to cull \s-1IPC\s0 events, and output the final plan if the plan was '\s-1NO PLAN\s0'. .ie n .IP "$bool = $hub\->active" 4 .el .IP "\f(CW$bool\fR = \f(CW$hub\fR\->active" 4 .IX Item "$bool = $hub->active" .PD 0 .ie n .IP "$hub\->set_active($bool)" 4 .el .IP "\f(CW$hub\fR\->set_active($bool)" 4 .IX Item "$hub->set_active($bool)" .PD These are used to get/set the 'active' attribute. When true this attribute will force \f(CW\*(C`hub\->finalize()\*(C'\fR to take action even if there is no plan, and no tests have been run. This flag is useful for plugins that add follow-up behaviors that need to run even if no events are seen. .SS "\s-1STATE METHODS\s0" .IX Subsection "STATE METHODS" .ie n .IP "$hub\->\fIreset_state()\fR" 4 .el .IP "\f(CW$hub\fR\->\fIreset_state()\fR" 4 .IX Item "$hub->reset_state()" Reset all state to the start. This sets the test count to 0, clears the plan, removes the failures, etc. .ie n .IP "$num = $hub\->count" 4 .el .IP "\f(CW$num\fR = \f(CW$hub\fR\->count" 4 .IX Item "$num = $hub->count" Get the number of tests that have been run. .ie n .IP "$num = $hub\->failed" 4 .el .IP "\f(CW$num\fR = \f(CW$hub\fR\->failed" 4 .IX Item "$num = $hub->failed" Get the number of failures (Not all failures come from a test fail, so this number can be larger than the count). .ie n .IP "$bool = $hub\->ended" 4 .el .IP "\f(CW$bool\fR = \f(CW$hub\fR\->ended" 4 .IX Item "$bool = $hub->ended" True if the testing has ended. This \s-1MAY\s0 return the stack frame of the tool that ended the test, but that is not guaranteed. .ie n .IP "$bool = $hub\->is_passing" 4 .el .IP "\f(CW$bool\fR = \f(CW$hub\fR\->is_passing" 4 .IX Item "$bool = $hub->is_passing" .PD 0 .ie n .IP "$hub\->is_passing($bool)" 4 .el .IP "\f(CW$hub\fR\->is_passing($bool)" 4 .IX Item "$hub->is_passing($bool)" .PD Check if the overall test run is a failure. Can also be used to set the pass/fail status. .ie n .IP "$hub\->plan($plan)" 4 .el .IP "\f(CW$hub\fR\->plan($plan)" 4 .IX Item "$hub->plan($plan)" .PD 0 .ie n .IP "$plan = $hub\->plan" 4 .el .IP "\f(CW$plan\fR = \f(CW$hub\fR\->plan" 4 .IX Item "$plan = $hub->plan" .PD Get or set the plan. The plan must be an integer larger than 0, the string \&'\s-1NO PLAN\s0', or the string '\s-1SKIP\s0'. .ie n .IP "$bool = $hub\->check_plan" 4 .el .IP "\f(CW$bool\fR = \f(CW$hub\fR\->check_plan" 4 .IX Item "$bool = $hub->check_plan" Check if the plan and counts match, but only if the tests have ended. If tests have not ended this will return undef, otherwise it will be a true/false. .SH "THIRD PARTY META-DATA" .IX Header "THIRD PARTY META-DATA" This object consumes Test2::Util::ExternalMeta which provides a consistent way for you to attach meta-data to instances of this class. This is useful for tools, plugins, and other extensions. .SH "SOURCE" .IX Header "SOURCE" The source code repository for Test2 can be found at \&\fIhttp://github.com/Test\-More/test\-more/\fR. .SH "MAINTAINERS" .IX Header "MAINTAINERS" .IP "Chad Granum <exodist@cpan.org>" 4 .IX Item "Chad Granum <exodist@cpan.org>" .SH "AUTHORS" .IX Header "AUTHORS" .PD 0 .IP "Chad Granum <exodist@cpan.org>" 4 .IX Item "Chad Granum <exodist@cpan.org>" .PD .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2020 Chad Granum <exodist@cpan.org>. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See \fIhttp://dev.perl.org/licenses/\fR
Close