The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Test2::Workflow::Util - Tools used by Test2::Workflow.

*** EXPERIMENTAL ***

This distribution is experimental, anything can change at any time!

DESCRIPTION

Collection of tools used by Test2-Workflow.

EXPORTS

All exports are optional, you must specify subs to import.

$bool = CAN_SET_SUB_NAME()

True if it is possible to set a sub name.

set_sub_name($name, $coderef)

When Sub::Name or Sub::Util are installed, this will be an alias to the sub name setting function from one or the other. If neither are installed then this will be a sub that throws an exception.

If setting the sub name is something nice, but not strictly necessary, you can use this conditionally with CAN_SET_SUB_NAME().

    use Test2::Util qw/CAN_SET_SUB_NAME set_sub_name/;
    set_sub_name('foo', \&sub) if CAN_SET_SUB_NAME();
rename_anon_sub($name, $sub)
rename_anon_sub($name, $sub, \@caller)

Rename a sub, but only if it is anonymous.

update_mask($file, $line, $sub, {...})

This sets masking behavior in accordance with Trace::Mask. This will have no effect on anything that does not honor Trace::Mask.

SOURCE

The source code repository for Test2-Workflow can be found at http://github.com/Test-More/Test-Workflow/.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>
Kent Fredric <kentnl@cpan.org>

COPYRIGHT

Copyright 2015 Chad Granum <exodist7@gmail.com>.

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/