blib/lib/CXC/Number/Grid/Role/BigNum.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 23 / 23 CC 2 SCAR 2.9
CC
2
Cov
100%
_convert
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/CXC/Number/Grid/Types.pm ↑ Summary blib/lib/CXC/Number/Sequence/Role/BigNum.pm »
1 package CXC::Number::Grid::Role::BigNum;
2  
3 # ABSTRACT: Role to return Math::BigFloats
4  
5 2 ▶use v5.28;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 our $VERSION = '0.12';
10  
11 2 ▶use experimental 'signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 ▶sub _convert ( $self, $bignum ) {
Subroutine _convert: called CC=2 SCAR=6.9
15 4 require Ref::Util;
16  
17 return Ref::Util::is_plain_arrayref( $bignum )
18 4 ▶ ? [ map { $_->copy } $bignum->@* ]
Branch: 1 branch
BranchTrueFalseTotal
Ref::Util::is_plain_arrayref($bignum) ? : 2 2 4
19 : $bignum->copy;
20 }
21  
22 #
23 # This file is part of CXC-Number
24 #
25 # This software is Copyright (c) 2019 by Smithsonian Astrophysical Observatory.
26 #
27 # This is free software, licensed under:
28 #
29 # The GNU General Public License, Version 3, June 2007
30 #
31  
32 2 1;
33  
34 __END__
35  
36 =pod
37  
38 =for :stopwords Diab Jerius Smithsonian Astrophysical Observatory
39  
40 =head1 NAME
41  
42 CXC::Number::Grid::Role::BigNum - Role to return Math::BigFloats
43  
44 =head1 VERSION
45  
46 version 0.12
47  
48 =head1 SYNOPSIS
49  
50 my $obj = CXC::Number::Grid->new( edges => \@edges );
51 Moo::Role->apply_role_to_object( $obj, 'CXC::Number::Grid::Role::BigNum' );
52  
53 =head1 DESCRIPTION
54  
55 A L<Moo> role providing a C<_convert> method which returns copies of the
56 passed L<Math::BigFloat> arrays and scalars.
57  
58 =head1 INTERNALS
59  
60 =head1 SUPPORT
61  
62 =head2 Bugs
63  
64 Please report any bugs or feature requests to bug-cxc-number@rt.cpan.org or through the web interface at: L<https://rt.cpan.org/Public/Dist/Display.html?Name=CXC-Number>
65  
66 =head2 Source
67  
68 Source is available at
69  
70 https://gitlab.com/djerius/cxc-number
71  
72 and may be cloned from
73  
74 https://gitlab.com/djerius/cxc-number.git
75  
76 =head1 SEE ALSO
77  
78 Please see those modules/websites for more information related to this module.
79  
80 =over 4
81  
82 =item *
83  
84 L<CXC::Number|CXC::Number>
85  
86 =item *
87  
88 L<CXC::Number::Sequence|CXC::Number::Sequence>
89  
90 =back
91  
92 =head1 AUTHOR
93  
94 Diab Jerius <djerius@cpan.org>
95  
96 =head1 COPYRIGHT AND LICENSE
97  
98 This software is Copyright (c) 2019 by Smithsonian Astrophysical Observatory.
99  
100 This is free software, licensed under:
101  
102 The GNU General Public License, Version 3, June 2007
103  
104 =cut
« blib/lib/CXC/Number/Grid/Types.pm ↑ Summary blib/lib/CXC/Number/Sequence/Role/BigNum.pm »