Test2::Util::Facets2Legacy - Online Linux Manual PageSection : 3
Updated : 2022-03-05
Source : perl v5.34.0
Note : User Contributed Perl Documentation

NAMETest2::Util::Facets2Legacy − Convert facet data to the legacy event API.

DESCRIPTIONThis module exports several subroutines from the older event API (see Test2::Event). These subroutines can be used as methods on any object that provides a custom facet_data() method. These subroutines can also be used as functions that take a facet data hashref as arguments.

SYNOPSIS

AS METHODS​ package My::Event; ​ ​ use Test2::Util::Facets2Legacy ':ALL'; ​ ​ sub facet_data { return { ... } } Then to use it: ​ my $e = My::Event−>new(...); ​ ​ my $causes_fail = $e−>causes_fail; ​ my $summary = $e−>summary; ​ ....

AS FUNCTIONS​ use Test2::Util::Facets2Legacy ':ALL'; ​ ​ my $f = { ​ assert => { ... }, ​ info => [{...}, ...], ​ control => {...}, ​ ... ​ }; ​ ​ my $causes_fail = causes_fail($f); ​ my $summary = summary($f);

NOTE ON CYCLESWhen used as methods, all these subroutines call $e−>facet_data(). The default facet_data() method in Test2::Event relies on the legacy methods this module emulates in order to work. As a result of this it is very easy to create infinite recursion bugs. These methods have cycle detection and will throw an exception early if a cycle is detected. uuid() is currently the only subroutine in this library that has a fallback behavior when cycles are detected.

EXPORTSNothing is exported by default. You must specify which methods to import, or use the ':ALL' tag. $bool = $e>causes_fail() $bool = causes_fail($f) Check if the event or facets result in a failing state. $bool = $e>diagnostics() $bool = diagnostics($f) Check if the event or facets contain any diagnostics information. $bool = $e>global() $bool = global($f) Check if the event or facets need to be globally processed. $bool = $e>increments_count() $bool = increments_count($f) Check if the event or facets make an assertion. $bool = $e>no_display() $bool = no_display($f) Check if the event or facets should be rendered or hidden. ($max, $directive, $reason) = $e>sets_plan() ($max, $directive, $reason) = sets_plan($f) Check if the event or facets set a plan, and return the plan details. $id = $e>subtest_id() $id = subtest_id($f) Get the subtest id, if any. $string = $e>summary() $string = summary($f) Get the summary of the event or facets hash, if any. $undef_or_int = $e>terminate() $undef_or_int = terminate($f) Check if the event or facets should result in process termination, if so the exit code is returned (which could be 0). undef is returned if no termination is requested. $uuid = $e>uuid() $uuid = uuid($f) Get the UUID of the facets or event. Note: This will fall back to $e−>SUPER::uuid() if a cycle is detected and an event is used as the argument.

SOURCEThe source code repository for Test2 can be found at ​http://github.com/Test−More/test−more/.

MAINTAINERSChad Granum <exodist@cpan.org> 

AUTHORSChad Granum <exodist@cpan.org> 

COPYRIGHTCopyright 2020 Chad Granum <exodist@cpan.org>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/
0
Johanes Gumabo
Data Size   :   19,169 byte
man-Test2::Util::Facets2Legacy.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 165,212
Visitor ID   :     :  
Visitor IP   :   3.137.186.26   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|Test2::Util::Facets2Legacy.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Test2::Util::Facets2Legacy.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|Test2::Util::Facets2Legacy.3pm|43|br══─}─══|'br══─}─══ )         (htmlprn|149|Test2::Util::Facets2Legacy.3pm|43|'br══─}─══ |'br══─}─══ )