Subject: | _render adds a comma before and |
I noticed when I was using duriation_exact that it doesn't return exactly what I was expecting.
As an example when running duration_exact(65.123)
# got: '1 minute, 5 seconds, and 123 milliseconds'
# expected: '1 minute, 5 seconds and 123 milliseconds'
The bug is the comma before the and.
I checked the code and found the problem in the _render sub.
I'm proposing you could change the two last rows:
$wheel[-1] = "and $wheel[-1]";
return join q{, }, @wheel;
To something like this:
my $last_wheel = ' and ' . pop @wheel;
return join(q{, }, @wheel) . $last_wheel;
It seems to fix the issue.