Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

SOLVED! Thanks to all Details, below.

Just updated to AS 5.24 on W7Pro (This is perl 5, version 24, subversion 0 (v5.24.0) built for MSWin32-x86-multi-thread-64int (with 1 registered patch....)Binary build 2400 [300560] provided by ActiveState ... Built Jul 13 2016 14:32:48)and now am having a script (which behaved as intended under 5.18) popping up the message "Can't start because perl518.dll is missing...." But I can't find any dependency for that .dll nor any other reference to it.

<update> para 1: added perl -v output thru 'patch....)' to more fully report perl -v output. </update>

Script in question is (trivially) modified from Perl Weekly #164 http://perltricks.com/article/114/2014/9/11/Get-a-weather-report-at-the-terminal-with-Perl

#!/usr/bin/env perl use strict; use warnings; use 5.24.0; use WWW::Wunderground::API; my $w = new WWW::Wunderground::API( location => '12123', api_key => 'nxnxnxnx', # API value concealed; your own is freely + avail at Wunderground auto_api => 1, lang => 'EN', ); my $home_location = 'Xxxx, XX'; # capture location print "Enter city or zip code ($home_location): "; my $location = <>; chomp $location; binmode STDOUT, ':utf8'; # for degrees symbol # print source_time say "\n WeatherUnderground forecast as of " . scalar localtime . "\n"; # print header printf "%-10s%-6s%-6s%-8s%-20s\n", 'Time', "TempF", "TempC", 'Rain %', 'Conditions'; # print hourly for (@{ $w->hourly }) { printf "%8s%6i%6i%8i %-30s\n", $_->{FCTTIME}{civil}, $_->{temp}{english}, $_->{temp}{metric}, $_->{pop}, $_->{condition}; }

Execution looks like this:

C:>weather.pl Enter city or zip code (Xxxxx): Xxxxx WeatherUnderground forecast as of Sun Nov 6 11:34:26 2016 Time TempF TempC Rain % Conditions malformed JSON string, neither array, object, number, string or atom, +at character offset 0 (before "(end of string)") at C:/Perl/site/lib/ +WWW/Wunderground/API.pm line 113.

The popup mentioned in para 1 is entitled: "perl.exe - System Error" with text: "The program can't start because perl518.dll is missing from your computer. Try reinstalling the program to fix this problem"

FWIW, 5.18 and the cited .dll are among the items removed in an attempt to have the script look to 5.24. No joy, there. (Running as admin, no ordinary Win7 search ap or util nor regedit finds any file named perl518.dll nor to any other vestige of AS 5.18

<update 1535: perl524.dll is present in C:\Perl\bin -- so does (maybe) something in the API or the modules it uses make perl518.dll a dependency? If so, I failed to find it.</update>

I've also checked the (WWW:Wunderground::) API.pm and have all the modules it uses. The line cited upon execution at the C:> prompt appears below:

$self->raw($result); if ($format !~ /(json|xml)/) { $self->data->{$action} = $self->raw(); return $self->raw(); } my $struc = $format eq 'json' # <--- LN 113 here ? decode_json($self->raw) : XMLin($self->raw);

Maybe I'm missing something obvious, but the only things obvious to me are the scabs from pulling my beard out by the roots. Haalp?


In reply to 5.24 missing "perl518.dll"? Senior Moment? by ww

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-19 01:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found