summaryrefslogtreecommitdiff
path: root/lib/Data/MultiValued/Ranges.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Data/MultiValued/Ranges.pm')
-rw-r--r--lib/Data/MultiValued/Ranges.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/Data/MultiValued/Ranges.pm b/lib/Data/MultiValued/Ranges.pm
index ef55b4c..296ae76 100644
--- a/lib/Data/MultiValued/Ranges.pm
+++ b/lib/Data/MultiValued/Ranges.pm
@@ -74,6 +74,7 @@ sub clear {
$self->_storage->clear(\%args);
}
+
1;
__END__
@@ -108,7 +109,10 @@ version 0.0.1
Stores the given value for the given range. Does not throw exceptions.
-The range is defined as C<< Num $x : $min <= $x < $max >>.
+The range is defined as C<< Num $x : $min <= $x < $max >>. A C<< from
+=> undef >> means "from -Inf", and a C<< to => undef >> means "to
++Inf". Not passing in C<from> or C<to> is equivalent to passing
+C<undef>.
If the given range intersects existing ranges, these are spliced to
avoid overlaps. In other words:
@@ -139,6 +143,9 @@ L<Data::MultiValued::Exceptions::RangeNotFound> exception if no ranges
exist in this object that include the point (remember that a range
does not include its C<to> point).
+A C<< at => undef >> means "at -Inf". Not passing in C<at> is
+equivalent to passing C<undef>.
+
No cloning is done: if a reference was stored, you get it back
untouched.
@@ -148,6 +155,10 @@ untouched.
Deletes all values for the given range. Does not throw exceptions.
+A C<< from => undef >> means "from -Inf", and a C<< to => undef >>
+means "to +Inf". Not passing in C<from> or C<to> is equivalent to
+passing C<undef>. Thus, C<< $obj->clear() >> clears everything.
+
If the given range intersects existing ranges, these are spliced. In
other words:
@@ -163,6 +174,10 @@ other words:
say $obj->get({at => 12}); # prints 'foo'
say $obj->get({at => 15}); # dies
+=head1 SEE ALSO
+
+L<Data::MultiValued::RangeContainer>, L<Data::MultiValued::Exceptions>
+
=head1 AUTHOR
Gianni Ceccarelli <dakkar@thenautilus.net>