Time::Duration::Object::Infinite - Time::Duration::Object, but infinite
version 0.300
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;
This is a class for Time::Duration::Object-like objects representing infinite durations.
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.
seconds
This method returns either +inf or -inf using Math::BigInt. (I don't recommend calling it.)
+inf
-inf
These methods both return "forever."
These methods return "forever ago" for positive durations and "forever from now" for negative durations.
These methods do the opposite of the ago methods.
ago
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.
later
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.
Ricardo SIGNES, <rjbs@cpan.org>
<rjbs@cpan.org>
Please report any bugs or feature requests through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Copyright 2007 Ricardo Signes, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Time::Duration::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Time::Duration::Object
CPAN shell
perl -MCPAN -e shell install Time::Duration::Object
For more information on module installation, please visit the detailed CPAN module installation guide.