SBECK-github / Date-Manip

Other
10 stars 11 forks source link

Use carp in Date::Manip::Date instead of warn "...\n" #18

Closed dallaylaen closed 2 years ago

dallaylaen commented 6 years ago

It would be nice if the exact place where the incorrect data comes from was specified rather than just a warning.

SBECK-github commented 6 years ago

I have been doing some research and have become convinced that I should use Carp for at least some of my die/warn statements. I've got a new release coming out in a couple of days and I'm not going to make this change that quickly, so once the next version is out, I'll spend some time and carefully evaluate where I want to change things. Errors that are due to something in my module really need to remain as die/warn (or perhaps change to confess). Errors due to something coming from the calling routine should be carp/croak.

Thanks for the request. I've had to rethink a lot of how I report errors, and I definitely want to make some changes.

dallaylaen commented 6 years ago

Great to hear from you! Waiting for the version then :)

SBECK-github commented 2 years ago

I am FINALLY making this change. I am not using this pull request because it only changes the warn messages in Date.pm. I've changed it in all of the modules.