1Test2::Util::Ref(3)   User Contributed Perl Documentation  Test2::Util::Ref(3)
2
3
4

NAME

6       Test2::Util::Ref - Tools for inspecting or manipulating references.
7

DESCRIPTION

9       These are used by Test2::Tools to inspect, render, or manipulate
10       references.
11

EXPORTS

13       All exports are optional. You must specify subs to import.
14
15       $type = rtype($ref)
16           A normalization between "Scalar::Util::reftype()" and "ref()".
17
18           Always returns a string.
19
20           Returns 'REGEXP' for regex types
21
22           Returns '' for non-refs
23
24           Otherwise returns what "Scalar::Util::reftype()" returns.
25
26       $addr_str = render_ref($ref)
27           Always returns a string. For unblessed references this returns
28           something like "SCALAR(0x...)". For blessed references it returns
29           "My::Thing=SCALAR(0x...)". The only difference between this and
30           "$add_str = "$thing"" is that it ignores any overloading to ensure
31           it is always the ref address.
32

SOURCE

34       The source code repository for Test2-Suite can be found at
35       https://github.com/Test-More/Test2-Suite/.
36

MAINTAINERS

38       Chad Granum <exodist@cpan.org>
39

AUTHORS

41       Chad Granum <exodist@cpan.org>
42       Kent Fredric <kentnl@cpan.org>
43
45       Copyright 2018 Chad Granum <exodist@cpan.org>.
46
47       This program is free software; you can redistribute it and/or modify it
48       under the same terms as Perl itself.
49
50       See http://dev.perl.org/licenses/
51
52
53
54perl v5.28.1                      2018-12-04               Test2::Util::Ref(3)
Impressum