Ricardo SIGNES > Time-Duration-Object > Time::Duration::Object::Infinite

Download:
Time-Duration-Object-0.301.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.301   Source  

NAME ^

Time::Duration::Object::Infinite - Time::Duration::Object, but infinite

VERSION ^

version 0.301

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.

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 <rjbs@cpan.org>

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.

syntax highlighting: