Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

using PAR to create a Perl environment on another PC

by spurperl (Priest)
on Sep 22, 2005 at 17:48 UTC ( [id://494222]=CUFP: print w/replies, xml ) Need Help??

One of Perl's greatest strengths is CPAN - the staggering collection of modules that help solving a very wide range of tasks. This strength has a catch, though - some of these modules are very, very difficult to install, especially on Windows machines.

One of such modules is Win32::SerialPort and its brethen, which I use at work to amaze my colleagues in showing off that "this Perl thing" can even speak to our hardware via RS232.

Win32::SerialPort is a torture to install, however, requiring a C compiler (not always present in EE development computers) and a lot of tweaking. I managed to install it on my PC some time ago and I don't want to repeat this experience.

But, a need arouse to run custom Perl scripts with SerialPort on another computer. I like working with Perl code instead of a GUI. Send "abs", no probs - uncomment a little code that does it and run, this allows great flexibility. So, to "port" this method to a colleague's PC I used an original approach with PAR:

First, I created a simple "host" script that "use"s SerialPort and other modules I need. This script allows to write a Perl file (using a simple GUI) and then "eval"s it, so that file can use these modules.

Then, I wrapped the script in a simple GUI and packed it to an .exe with PAR. Voila ! I can now run my small Perl scripts with Win32::SerialPort even on the laboratory laptop that has no network connection.

  • Comment on using PAR to create a Perl environment on another PC

Replies are listed 'Best First'.
Re: using PAR to create a Perl environment on another PC
by CountZero (Bishop) on Sep 22, 2005 at 20:34 UTC
    Interesting, but you could have installed Win32::SerialPort through ppm. Activestate has the Perl 5.6 version and http://www.bribes.org also has the Perl 5.8 version.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

      I could have, on a PC with an internet connection, which unfortunately isn't the case with some machines at work.
        That is not entirely true: you can download (on another computer) the ppd files and such put them on a CD or floppy and have it install from this.

        CountZero

        "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-23 22:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found