Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

5.24 missing "perl518.dll"? Senior Moment?

by ww (Archbishop)
on Nov 06, 2016 at 16:53 UTC ( [id://1175371]=perlquestion: print w/replies, xml ) Need Help??

ww has asked for the wisdom of the Perl Monks concerning the following question:

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?

Replies are listed 'Best First'.
Re: 5.24 missing "perl518.dll"? Senior Moment?
by Corion (Patriarch) on Nov 06, 2016 at 16:56 UTC

    I would assume that somewhere on your harddisk (and especially within $ENV{PATH}), there are DLLs that belonged to the once-Perl-5.18 and for some reason, Perl 5.24 picks them up before picking up its own DLLs. Maybe it's an XML lib, because on line 113 (resp. the statement starting on line 113), you call XMLin, which likely is from XML::Simple and which might use XML::Parser or whatever ...

      Yeah, per this ActiveState forum post, it looks like modules installed outside of the ActiveState Perl distribution will need to be reinstalled (or perhaps even removed/installed).

Re: 5.24 missing "perl518.dll"? Senior Moment?
by davies (Prior) on Nov 06, 2016 at 17:19 UTC

    Did you, under your old system, have any modules that needed compilation (as in used a C compiler)? If so, is it possible that this compilation created a link to the old DLL that has now been removed?

    Unrelated suggestion: I had a similar problem when doing something with MariaDB/MySQL. I THINK I installed Maria first, which loaded something that used something 32 bit. Then, when I loaded DBD::MySQL, it defaulted (correctly) to 64 bit and then complained about the DLL. The only way forward was to uninstall Maria and Perl.

    These are pretty wild guesses. I hope they're not nonsense, but I offer no guarantees.

    Regards,

    John Davies

Re: 5.24 missing "perl518.dll"? Senior Moment?
by ww (Archbishop) on Nov 06, 2016 at 21:11 UTC

    What worked to solve: your help and suggestions, which led me to wonder if WWW::Wunderground::API was borked (after originally being added to 5.24's C:\Perl\Site\Lib\ via ppm).

    I never did find any specific problem, nor leftover links/registry/whatever references to 5.18 but eventually used ppm verify.... on the 5.24 copy and got a "verification failed" response.

    Perhaps some other hapless Monk will find this useful...I hope, but for sure, I removed the bad copy with PPM; installed again, and all is well. Again, THANK YOU!

      Very interesting.

      Most folks just use the ppm GUI, but there are quite a number of command line options for ppm.
      I attach a few commands below.

      I have "cloned" an Active State installation before. To do that, I saved a profile (which is an XML file)... Installed Active State from the web on the new machine and then restored the "profile" on the new machine. BTW, there are more PPD repositories than just the main Active State repo.

      Just for fun, I just did a "ppd upgrade --install" on my current test machine. Go to lunch while this is running because it can take awhile. Many thousands of files on my machine were modified. However, it appears that all of my packages have been brought up to date, including the HTML doc's. A "dangerous" thing to do, but this a a test machine - not production.

      Anyway, for those interested, muck around with ppm at the command line....

      C:\Projects_Perl\testing>ppm -help Unrecognized ppm command '-help'; try one of area, config, describe, f +iles, gui, help, info, install, list, log, profile, query, remove, repo, search, tree, uninstall, update, upgrade, verify, or version Usage: ppm <cmd> <arg>... Run 'ppm help' to learn more. C:\Projects_Perl\testing>ppm verify -help ppm verify [ *pkg* ] Checks that the installed files are still present and unmodifi +ed. If the package name is given, only that packages is verified. + C:\Projects_Perl\testing>ppm profile -help ppm profile restore [ *filename* ] Install the packages listed in the given profile file. If no f +ile is given try to read the profile from standard input. ppm profile save [ *filename* ] Write profile of configured repositories and installed package +s to the given file. If no file is given then print the profile XML + to standard output.

      Thank you for posting this - I didn't know there was a ppm verify command. This certainly will make bug hunting easier for broken installations.

Re: 5.24 missing "perl518.dll"? Senior Moment?
by Laurent_R (Canon) on Nov 06, 2016 at 20:16 UTC
    It seems that you may actually be launching Perl 5.18, rather than the new 5.24 version you've just installed.

    What do you get when you type this at the cmd prompt:

    perl -v
Re: 5.24 missing "perl518.dll"? Senior Moment?
by Discipulus (Canon) on Nov 06, 2016 at 18:40 UTC
    Just updated to AS 5.24 on W7Pro..

    tangentially speaking; why upgrade an AS Perl distribution? as yet said probably your %ENV has wrong path after such upgrade.

    Why you do not try using strawberry especially portable editions which ship with a little launcher ( portableshell.bat ) which take care to set a consistent %ENV for you?

    i bet the senior moment is not your..

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1175371]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found