Transfigure/Default/ToString.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 17 CC 1 SCAR 6.9
CC
1
Cov
0%
BUILDARGS
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Data::Transfigure::Default::ToString 1.03;
2 use v5.26;
3 use warnings;
4  
5 # ABSTRACT: default stringification of untransfigured values
6  
7 =head1 NAME
8  
9 Data::Transfigure::Default::ToString - default stringification of untransfigured
10 values
11  
12 =head1 DESCRIPTION
13  
14 This transfigurator unilaterally forces stringification of all the values in a
15 structure that no other transfigurator applies to, even undef.
16  
17 =cut
18  
19 use Object::Pad;
20  
21 class Data::Transfigure::Default::ToString : isa(Data::Transfigure::Default) {
22  
23 =head1 FIELDS
24  
25 I<none>
26  
27 =cut
28  
29 sub BUILDARGS ($class) {
30 $class->SUPER::BUILDARGS(
31 handler => sub ($value) {
32 return "$value";
33 }
34 );
35 }
36  
37 }
38  
39 =pod
40  
41 =head1 AUTHOR
42  
43 Mark Tyrrell C<< <mark@tyrrminal.dev> >>
44  
45 =head1 LICENSE
46  
47 Copyright (c) 2024 Mark Tyrrell
48  
49 Permission is hereby granted, free of charge, to any person obtaining a copy
50 of this software and associated documentation files (the "Software"), to deal
51 in the Software without restriction, including without limitation the rights
52 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
53 copies of the Software, and to permit persons to whom the Software is
54 furnished to do so, subject to the following conditions:
55  
56 The above copyright notice and this permission notice shall be included in all
57 copies or substantial portions of the Software.
58  
59 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
65 SOFTWARE.
66  
67 =cut
68  
69 1;
70  
71 __END__