in reply to Running a packaged script using MozRepl

I have gotten WWW::Mechanize::Firefox to work before with Active State Perl, but years ago and haven't done it on my current PC. I am was on XP at the time.

You won't like this answer because it is not easy. But you probably had to do something to your PC in order to make the Perl script work from the .pl file which you have now forgotten about.

Since you are talking about a colleague instead some unknown guy on the internet, I would install Perl on his machine and see what it takes to get the un-packaged (non .exe) source code to run on his machine. That my remind you of some debugging steps that you did on your machine. Then I would make an .exe on his machine and see if it runs on your machine.

There are many ways to go wrong with pp. When I was doing this with AS, I had a license to their .exe builder (PerlApp). I started with this thing in the '90's, when their dev kit was pretty "cheap". I think the AS price is "outa sight" nowadays. Anyway get source to run on your colleague's machine. Follow the trail from there.

  • Comment on Re: Running a packaged script using MozRepl

Replies are listed 'Best First'.
Re^2: Running a packaged script using MozRepl
by frazap (Monk) on Jul 19, 2017 at 07:46 UTC
    I followed Marshall's advice and install strawberry perl on my colleague's pc.

    I couldn't pass the test with MozRepl::RemoteObject and at the end, I saw that the Firefox version of my colleague was 55 and mine is 54.

    We install Firefox 54 on his pc and the packaged program using WWW::Mechanize::Firefox works.

    So the mozrepl Addon does not work in FF 55.

    I tried WWW::Mechanize::Chrome, which works as a script, but that I couldn't pack. Always hitting the error

    Can't call method "new" without a package or object reference at Futur +e/HTTP.pm line 67.
    with the exe.

    At the end, I have install this module and it's dependencies and use the script.

    F.

      Future::HTTP dynamically loads the appropriate backends, so you need to include these when packaging your script too.

        Thanks !

        Could you be more specific on how can I include the missing object reference ?

        F.

      Hi, Just so everyone is aware, it looks like WWW:Mechanize:FF will stop working with firefox 57:

      > MozRepl will no longer work as of FF55 due to their shift to web extensions

      Apparently and sadly yes, see https://github.com/bard/mozrepl

      Important Notice

      Key technologies upon which MozRepl depends will be retired from the Mozilla platform in November 2017. If you are relying on MozRepl, please investigate migration paths. The last known compatible version is Firefox 54.

      This is indeed of interest for some of us, at least for maintainers and users of WWW::Mechanize::Firefox, which depends on MozRepl::RemoteObject

      more comments: Re: mozrepl end of life

      2017-10-08 Athanasius fixed links and added blockquote and paragraph tags

      "which works as a script, but that I couldn't pack. Always hitting the error"

      Can you show your pp line for the failed package?

        pp @ppopts_chrome.txt -x -o cotes.exe cotes.pl reroid1.txt cotes.txt
        With a horribly long ppots_chrome.txt file

        Update: the long file resulted from my misaplication of your suggestion: if I gave default values for my args, to allow the script to run without problems with -x, I could diff the log file and the resulting modules (much shorter) list gave an exe that works

        -M AE.pm -M AnyEvent.pm -M AnyEvent/DNS.pm -M AnyEvent/Future.pm -M AnyEvent/Handle.pm -M AnyEvent/Impl/Perl.pm -M AnyEvent/Loop.pm -M AnyEvent/Socket.pm -M AnyEvent/Util.pm -M AnyEvent/WebSocket/Client.pm -M AnyEvent/WebSocket/Connection.pm -M AnyEvent/WebSocket/Message.pm -M AnyEvent/constants.pl -M Chrome/DevToolsProtocol/Transport/AnyEvent.pm -M Class/XSAccessor.pm -M Class/XSAccessor/Heavy.pm -M Digest/SHA.pm -M Future/HTTP/Tiny.pm -M HTTP/Tiny.pm -M PerlX/Maybe.pm -M Protocol/WebSocket/Cookie.pm -M Protocol/WebSocket/Cookie/Request.pm -M Protocol/WebSocket/Cookie/Response.pm -M Protocol/WebSocket/Frame.pm -M Protocol/WebSocket/Handshake.pm -M Protocol/WebSocket/Handshake/Client.pm -M Protocol/WebSocket/Message.pm -M Protocol/WebSocket/Request.pm -M Protocol/WebSocket/Response.pm -M Protocol/WebSocket/Stateful.pm -M Protocol/WebSocket/URL.pm -M Sub/Util.pm -M WWW/Mechanize/Chrome.pm

      Give ppsimple.pl a try, if it doesn't work post the last part of the log which is the call to pp/invocation of pp, and the output of pp

        Same error with ppsimple.pl

        Last part of the output

        PP => "C:\\strawberry\\perl\\site\\bin\\pp.BAT", REFLESSINC => [ "U:\\docs\\perl\\lib", "C:/strawberry/perl/site/lib/MSWin32-x86-multi-thread-64int", "C:/strawberry/perl/site/lib", "C:/strawberry/perl/vendor/lib", "C:/strawberry/perl/lib", ".", ], SCANDEPS => "C:\\strawberry\\perl\\site\\bin\\scandeps.BAT", WXPAR => "C:\\strawberry\\perl\\site\\bin\\wxpar.BAT", }, "Snack") [ "C:\\strawberry\\perl\\site\\bin\\scandeps.BAT", "-V", "-c", "-C", "C:\\Users\\rappazf\\AppData\\Local/par-pp-CACHEFILE.dat", "cotes_chrome.pl", ] ... Packing "C:\Users\rappazf\AppData\Local\Temp\par-72617070617a66\cache- +7442687ab21232eb108bc766c9a1b22665abdf7b/f9475560.dll"... Written as "auto/Win32/Win32.xs.dll" try cotes_chrome.exe if it works without %PATH% change it to gui with ( C:\strawberry\perl\ +bin\exe_update.BAT )