in reply to Re^2: Time:Piece help
in thread Time:Piece help

On a side note, Time::Piece API is bad for it returns T::P object when adding a plain number; returns Time::Seconds object when adding two T::P objects.

Adding a number to a T::P object and getting back a T::P object makes sense (the 'number' is assumed to be seconds). What do you expect? The last part of your statement is wrong...you cannot add two T::P objects...that would make no sense, and it is rightfully an error to do so. You can subtract two T::P objects and get back a T::S object, as that makes sense. So what is bad about the API?