| 1 | package CXC::Number::Sequence::Role::BigNum; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: Role to return Math::BigFloats from Sequences | ||||||||||
| 4 | |||||||||||
| 5 | 3 | ▶ | use v5.28; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 3 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 3 | our $VERSION = '0.12'; | |||||||||
| 10 | |||||||||||
| 11 | 3 | ▶ | use experimental 'signatures'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 3 | ▶ | 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 | 5 | require Ref::Util; | |||||||||
| 16 | |||||||||||
| 17 | return Ref::Util::is_plain_arrayref( $bignum ) | ||||||||||
| 18 | 5 | ▶ | ? [ map { $_->copy } $bignum->@* ] | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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 | 3 | 1; | |||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||
| 35 | |||||||||||
| 36 | =pod | ||||||||||
| 37 | |||||||||||
| 38 | =for :stopwords Diab Jerius Smithsonian Astrophysical Observatory | ||||||||||
| 39 | |||||||||||
| 40 | =head1 NAME | ||||||||||
| 41 | |||||||||||
| 42 | CXC::Number::Sequence::Role::BigNum - Role to return Math::BigFloats from Sequences | ||||||||||
| 43 | |||||||||||
| 44 | =head1 VERSION | ||||||||||
| 45 | |||||||||||
| 46 | version 0.12 | ||||||||||
| 47 | |||||||||||
| 48 | =head1 SYNOPSIS | ||||||||||
| 49 | |||||||||||
| 50 | my $obj = CXC::Number::Sequence->build( $class, %options)->elements => \@elements ); | ||||||||||
| 51 | Moo::Role->apply_role_to_object( $obj, 'CXC::Number::Sequence::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 | ||||||||||