Perl to go.
I dont work in the computer field... Actually, I work in the medical field. However, in my downtime at work I sometimes like to play around with ideas in perl. I have computer access, but no access to install software.
In the past, I have run ssh client from a usb thumbdrive to my computer at home. However, I really didnt like the idea of my password possibly being logged since there is monitoring software.
Well, how about a full perl distribution on a thumbdrive? Talk about portable. I could take my perl, modules, editor and code with me.
Here is what I wanted.
I wanted to be able to insert my thumbdrive click on a shortcut and have cmd prompt pop-up with perl, my editor, and unix utils in my path. Here is what I did to get it working.
The systems I wanted to use this on would be running either windows XP or Windows 2000. Instead of messing with trying to get Activestate to work I compiled perl from the source.
First I installed mingw which was used to compile perl. The procedure was quite simple, install the software and add to your path. Next download dmake and add it to your path.
If you dont want to install perl to c:\perl then you need to edit the file makefile.mk. The config file is allready setup to use with mingw right out of the box. Then fire up a cmd shell, and do the following:
Then you just copy over the c:\perl over to your thumbdrive. Perl to go. To save some space you can also delete the html docs.
I also then added the unix utils to the thumbdrive and also the vim editor.
The next problem was how to deal with the drive allways being on a different volume from computer to computer.. One computer it would be drive I: the other e: for example... And how can I set the path to my binaries??
My solution is one batch file and a small perl script.
Batch file: start-cmd.bat
Perl file: autostart.pl
Tada!!! Now I just double-click on the batch file start-cmd.bat and I have a cmd window with the path set to all of my binaries. No matter what drive it is mapped to I have a nice portable perl development environment to go. :)