The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tie::BoundedInteger - Limit the magnitude of a number in a scalar

SYNOPSIS

        use Tie::BoundedInteger;
        my( $min, $max ) = ( 1, 4 );
        tie my $bounded, 'Tie::BoundedInteger', $min, $max;

        $bounded = 3;  # works fine
        $bounded = 5;  # doesn't work

DESCRIPTION

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.

SOURCE AVAILABILITY

This module is on Github:

        https://github.com/briandfoy/tie-boundedinteger

AUTHOR

brian d foy, <briandfoy@pobox.com>

COPYRIGHT AND LICENSE

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.