package CXC::Gnuplot::V1::Bound::Numeric;

use v5.38;
use Object::Pad 0.821;
use CXC::Gnuplot::V1::Bound;

our $VERSION = 'v0.29.3';

class CXC::Gnuplot::V1::Bound::Numeric : isa(CXC::Gnuplot::V1::Bound);

my sub croak {
    require Carp;
    goto \&Carp::croak;
}

use CXC::Gnuplot::V1::Types -lexical => 'Num', 'is_Num';
use CXC::Gnuplot::V1::Util -lexical => 'pvalidate';











ADJUST {

    pvalidate( lower_bound => Num, \$self->lower_bound );
    pvalidate( upper_bound => Num, \$self->upper_bound );

    if ( !is_Num( $self->bound ) ) {
        croak( '"bound" parameter must be a number or the character "*"' )
          if $self->bound ne q{*};
    }
    elsif (defined $self->lower_bound
        or defined $self->upper_bound )
    {
        croak(
            '"bound" parameter cannot be a number if any of the "upper_bound" or "lower_bound" parameters are specified',
        );
    }

}

1;

#
# This file is part of CXC-Gnuplot
#
# This software is Copyright (c) 2024 by Smithsonian Astrophysical Observatory.
#
# This is free software, licensed under:
#
#   The GNU General Public License, Version 3, June 2007
#

__END__

=pod

=for :stopwords Diab Jerius Smithsonian Astrophysical Observatory

=head1 NAME

CXC::Gnuplot::V1::Bound::Numeric

=head1 VERSION

version v0.29.3

=head1 CONSTRUCTORS

=head2 new

=head1 INTERNALS

=for Pod::Coverage META
DOES
BUILDARGS
clone

=head1 SUPPORT

=head2 Bugs

Please report any bugs or feature requests to bug-cxc-gnuplot@rt.cpan.org  or through the web interface at: L<https://rt.cpan.org/Public/Dist/Display.html?Name=CXC-Gnuplot>

=head2 Source

Source is available at

  https://codeberg.org/CXC-Optics/p5-CXC-Gnuplot

and may be cloned from

  https://codeberg.org/CXC-Optics/p5-CXC-Gnuplot.git

=head1 SEE ALSO

Please see those modules/websites for more information related to this module.

=over 4

=item *

L<CXC::Gnuplot|CXC::Gnuplot>

=back

=head1 AUTHOR

Diab Jerius <djerius@cfa.harvard.edu>

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2024 by Smithsonian Astrophysical Observatory.

This is free software, licensed under:

  The GNU General Public License, Version 3, June 2007

=cut
