Qhull
view release on metacpan or search on metacpan
lib/Qhull/Util/Options.pm view on Meta::CPAN
package Qhull::Util::Options;
# ABSTRACT: Options for Qhull and gang
use v5.26;
use strict;
use warnings;
use experimental 'signatures', 'lexical_subs', 'declared_refs';
use Log::Any '$log';
our $VERSION = '0.07';
use parent 'Exporter::Tiny';
use Readonly::Tiny 'readonly';
use Regexp::Common 'number';
use List::Util 'first';
use CXC::Exporter::Util ':all';
use Ref::Util 'is_arrayref', 'is_hashref';
our @CARP_NOT = qw( Qhull::PP Qhull::Options );
BEGIN {
install_CONSTANTS( {
CATEGORIES => {
map { ( "CAT_\U$_" => $_ ) }
qw(
compute
control
input
input_format
output
output_format
output_format_amend
output_geom
precision
print
trace
),
},
} );
install_EXPORTS;
}
install_EXPORTS( {
func => [qw( parse_options )],
Option => [qw( %Option )],
TypesQR => [
qw( $Int $PositiveOrZeroInt $NegativeInt
$Num $PositiveOrZeroNum $NegativeNum
),
],
} );
my sub croak {
require Carp;
goto \&Carp::croak;
}
## no critic (Variables::ProhibitPackageVars)
our $Int = $RE{num}{int};
our $PositiveOrZeroInt = $RE{num}{int}{ -sign => q{} };
our $NegativeInt = $RE{num}{int}{ -sign => q{-} };
our $Num = $RE{num}{real};
our $PositiveOrZeroNum = $RE{num}{real}{ -sign => q{} };
our $NegativeNum = $RE{num}{real}{ -sign => q{-} };
# our mapping of Qhull's esoteric options formulation onto
# something we can use. Validation of options is not the point
# here, just the ability to uniquely identify the option.
# At some point this might be extended to providing a more
# Perlish interface (or at the least, a more sane way of
# specifying options).
my %Option = map { ## no critic (BuiltinFunctions::ProhibitComplexMappings)
my $name;
( run in 0.700 second using v1.01-cache-2.11-cpan-39bf76dae61 )