As requested, a fairly rough and ready proof of concept using Mojo:

Your script works perfectly, right out of the gate. I have tons of questions but don't want to muck up this thread by overreaching on this nice, neat result. I have been trying to imitate and extend it in other ways, but these results are slow to attain, but I don't want you to think I'm not trying:

$ ls *mo* 1.1.mojo_api.pl 1.monk.tag.pl 2.3.mojo_json.pl 2.monk.tag.pl 1.1.mojo_json.pl 1.mo_pm.pl 2.4.mojo_json.pl 3.1.mojo_weathe +r.pl 1.2.mojo_api.pl 1.mo_pm.txt 2.5.mojo_json.pl 3.mojo_weather. +pl 1.mojo_json.pl 2.1.mojo_json.pl 2.mojo_json.pl 1.mojo_tree.pl 2.2.mojo_json.pl 2.mojo_weather.pl $

Some of them didn't work for the strangest reasons. I had to get used to the strangeness in other cases. I will have run these hundreds of times of times before it dawned on me that the reason I never saw a value of rainfall other than undef is that no one on god's green earth has any idea what that value could be. (I wonder why it's there. A stubout for guesses?)

I do want to pursue these ideas further, though, and have started another thread which generalizes this result: getting Sun info with Astro::Coord::ECI::Sun

Thanks so much for lending your considerable expertise to the matter at hand....


In reply to Re^2: polishing up a json fetching script for weather data by Aldebaran
in thread polishing up a json fetching script for weather data by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.