Issue #6
added forecast option and pod
split out the openweathermap uri, endpoint, and params
added call to forecast endpoint
TODO: we're still not getting back the list of days from forecast, so something in the call isn't correct.
Issue #1
since we're doing a geolocation lookup anyway to get the other geo information, might as well remove the option to specify the location at all.
this tool is for me; I don't really expect anyone to use it other than me. if that changes in the future, I'm happy to add the option to get weather for a specified location.
switched to an actual recognized software license.
it basically says the same thing as the uncopyright statement I previously had, http://zenhabits.net/uncopyright, but with a little less philosophy in there.
So, back when I was first learning Perl, I received some advise about exiting a program on failure. I was specifically told, use die and not exit. However, as I've read and researched, die will exit a program with status 255, which in the Unix world is out of range.
If someone is planning on running this script and wants the exit status for some reason, exit status 255 is most likely not going to be expected. Exit status 0 or 1 will be expected, and are universally recognized as success and failure (from a shell or system perspective, not Perl internals).
On research, and what I'm going with for now, is that the program should exit 0 or 1 if you don't have intention of trapping the error within the script itself. In that case, there are alternatives, such as die, or croak (for a different circumstatnce).
Anyway, my underlying point here is that sometimes people's opinion about what is right and wrong is not necessarily right or wrong. You have to figure out through research what makes more sense for you and your application of that knowledge. The person helping me in the beginning had good intentions, there's not doubt there, but the information which was given, IMO, wasn't correct.
it just didn't seem very easy to read, and I'm a stickler for readability and easy design.
I didn't want to change too much, but just tweak it a little to make it easier to process the information when I looked at it.
there were a few things to clean up
initially, I was wanting to use the information returned from the geolookup directly, without having to do another lookup to wunderground for the city and state information.
in the end, I decided to keep that additional API call, since I would have to format the state returned from the geolookup from TX to Texas, so keeping a table of information would have been much more work, for not a lot of payout.
wanting to streamline some things
making it faster, making it more intelligent.
I remember Emily saying running it didn't make sense to her.
I started out changing the help menu, but thought of ways to make it easier without user interaction.