NAME
Time::Duration::Object::Infinite - Time::Duration::Object, but infinite
VERSION
version 0.302
SYNOPSIS
use Time::Duration::Object::Infinite;
my $duration = Time::Duration::Object::Infinite->new_future;
# It will happen forever from now.
print "It will happen ", $duration->from_now;
DESCRIPTION
This is a class for Time::Duration::Object-like objects representing infinite durations.
PERL VERSION
This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.
Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.
METHODS
new
new_positive
These methods return a new Time::Duration::Object::Infinite for a positive duration.
new_negative
This returns a new Time::Duration::Object::Infinite for a negative duration.
new_seconds
This method returns either +inf
or -inf
using Math::BigInt. (I don't recommend calling it.)
duration
duration_exact
These methods both return "forever."
ago
ago_exact
These methods return "forever ago" for positive durations and "forever from now" for negative durations.
from_now
from_now_exact
These methods do the opposite of the ago
methods.
later
later_exact
These methods return "infinitely later" for positive durations and "infinitely earlier" for negative durations.
earlier
earlier_exact
These methods do the opposite of the later
methods.
concise
This method can be called on the result of the above methods, trimming down the ouput. For example:
my $duration = Time::Duration::Object::Infinite->new_positive;
print $duration->ago; # forever ago
print $duration->ago->concise # forever ago
Doesn't look any shorter, does it? No, it won't be. These methods are here for compatibility with Time::Duration::Object's returns.
AUTHOR
Ricardo SIGNES <cpan@semiotic.systems>
COPYRIGHT AND LICENSE
This software is copyright (c) 2004 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.