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

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

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.300   Source   Latest Release: Time-Duration-Object-0.301

NAME ^

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

VERSION ^

version 0.300

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.

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>

BUGS ^

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 ^

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.

syntax highlighting: