Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting to Time::Piece instead of Date::Calc #3

Merged
merged 4 commits into from Feb 17, 2015

Conversation

mbeijen
Copy link
Contributor

@mbeijen mbeijen commented Feb 13, 2015

Hi, as discussed via email, here's my pull request for porting to Time::Piece instead of Date::Calc.

Please let me know if all is clear, or if you'd prefer something else. I could also split this in different PRs if you'd prefer.

Michiel

Time::Piece is a core module since Perl 5.10.
Date::Calc is diffucult to install and not so nice.

And apart from that since 1st of January 2015 the module started to
fail its unit tests and this has not been fixed yet.

https://rt.cpan.org/Public/Bug/Display.html?id=101232

I modified just the module in this commit. The test files also use
Date::Calc but they're in a separate commit so you can easily check
out just the module changes and see the 'old' tests pass with the
new code.
Also, I added more iterations to the tests; previously the tests
created one single random date and then checked if it was between
boundaries. Now the tests create LOTS of random dates and test the
boundaries.
Previously, File::Spec and a temp dir was used, this was difficult
but probably for historic reasons. Now I use File::Temp.
Also I removed the execute bit from Makefile.PL and the tests - they
should not have that.
 - no execute bits on READMEs
 - update README
 - no indirect object creation
 - no two-arg open in POD example
 - strict & warnings in modules
barefootcoder added a commit that referenced this pull request Feb 17, 2015
Porting to Time::Piece instead of Date::Calc
@barefootcoder barefootcoder merged commit ff79662 into barefootcoder:master Feb 17, 2015
@barefootcoder
Copy link
Owner

The code all looks good to me--lots of great improvements! But I'm seeing a pretty consistent failure in t/rand_datetime.t: 1 or 2 of these every run of make tests.

#   Failed test 'rand_datetime not bigger than maximum'
#   at t/rand_datetime.t line 73.
#     'Tue Feb 17 03:00:24 2015'
#         <=
#     'Tue Feb 17 02:39:11 2015'

I glanced at it quickly but didn't see anything obvious. If you want to take a look and see if you can track it down, great. Otherwise I'll try to take a longer look later in the week.

@mbeijen
Copy link
Contributor Author

mbeijen commented Feb 17, 2015

Sure, no problem!!

On Tue, Feb 17, 2015 at 11:44 AM, Buddy Burden notifications@github.com
wrote:

The code all looks good to me--lots of great improvements! But I'm seeing
a pretty consistent failure in t/rand_datetime.t: 1 or 2 of these every
run of make tests.

Failed test 'rand_datetime not bigger than maximum'

at t/rand_datetime.t line 73.

'Tue Feb 17 03:00:24 2015'

<=

'Tue Feb 17 02:39:11 2015'

I glanced at it quickly but didn't see anything obvious. If you want to
take a look and see if you can track it down, great. Otherwise I'll try to
take a longer look later in the week.


Reply to this email directly or view it on GitHub
#3 (comment)
.

@mbeijen mbeijen deleted the distimp branch April 14, 2015 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants