Tie::BoundedInteger - Limit the magnitude of a number in a scalar
use Tie::BoundedInteger; my( $min, $max ) = ( 1, 4 ); tie my $bounded, 'Tie::BoundedInteger', $min, $max; $bounded = 3; # works fine $bounded = 5; # doesn't work
You use Tie::BoundedInteger limits the magnitude of a scalar by using the tie mechanism. This is mostly a demonstration module that shows how tie works.
Tie::BoundedInteger
tie
This module is on Github:
https://github.com/briandfoy/tie-boundedinteger
brian d foy, <briandfoy@pobox.com>
<briandfoy@pobox.com>
Copyright © 2005-2024, brian d foy <bdfoy@cpan.org>. All rights reserved. This software is available under the terms of the Artistic License 2.0.
To install Tie::BoundedInteger, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::BoundedInteger
CPAN shell
perl -MCPAN -e shell install Tie::BoundedInteger
For more information on module installation, please visit the detailed CPAN module installation guide.