Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Perl Module Stripping

by Justin_BSI (Acolyte)
on Apr 19, 2006 at 21:11 UTC ( #544439=perlquestion: print w/replies, xml ) Need Help??

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

I am using ActivePerl at work to create some error checking scripts for the new machines we build here. I managed to fit the needed components of ActivePerl onto a floppy disk for portable use, and also mananged to fit the File module as well. Unfortunately, this left me with very little left for scripts, so I editted the File module to include only the modules parts I needed and removed everything I could from ActivePerl. I currently have about 380kb of space on the disk, which is plenty for scripts, but I may need to add additional modules later.

Are there any scripts or programs that strip the Perldoc code from modules? I just want to save a few extra K on the floppy.

Disclaimer: Yes, I know this is bad practice. I program all scripts on a machine with the full install so I don't feel bad about it. Also, a cdrom is out of the question at this time for internal reasons. Let it be said it's in the works, but not for a couple of months (at which time I plan a unified toolkit instead of a stack of floppys.)

Thanks!

Replies are listed 'Best First'.
Re: Perl Module Stripping
by CountZero (Bishop) on Apr 19, 2006 at 21:31 UTC
    Are there any scripts or programs that strip the Perldoc code from modules?

    You would be looking for Pod::Stripper.

    CountZero

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

      Thanks, I think I'll try that alongside the pp and PAR software.
Re: Perl Module Stripping
by dragonchild (Archbishop) on Apr 19, 2006 at 21:47 UTC
    You may also want to look at perltidy. Specifically, perltidy -mangle

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      Thanks! perltidy -mangle -dac did the trick nicely.
Re: Perl Module Stripping
by marto (Cardinal) on Apr 19, 2006 at 21:22 UTC
    Hi Justin_BSI,

    Perhaps I am not understanding your situation totally.
    Have you seen PAR (or the bundled pp script) ? You could use it to package your scripts and the modules they use into an standalone app.

    Hope this helps.

    Martin
      I appreciate the link, but we are (unfortunately) a Win32 house and I highly doubt I can convince my boss to let me have a Linux or BSD machine here.
        Hi Justin_BSI,

        Take a look at the documentation, this solution will work for a Windows environment and build stand alone executables (exe files) out of your scripts and their dependant modules. You can install PAR using PPM. There is also a PAR tutorial you can read should you need some help.

        Hope this helps.

        Martin
Re: Perl Module Stripping
by davido (Cardinal) on Apr 19, 2006 at 21:52 UTC

    There's no possibility of using a CDROM, DVD, USB flash-rom keychain drive, USB external hard drive, or at least a zip250? It's 2006 here already. I haven't touched a floppy in years because they haven't kept up with the need for portable storage space. There are many alternatives, unless of course, the target systems don't support any of those alternatives. YMMV.


    Dave

Re: Perl Module Stripping
by gawatkins (Monsignor) on Apr 20, 2006 at 02:47 UTC

    Using a Win98 startup disk as an example, you could compress your disk contents and then uncompress them into a ramdrive when loaded. I used to do this with my files when I was programming c++ in college, it was much faster than accessing straight from the floppy disk.

    Thanks,
    Greg W.
Re: Perl Module Stripping
by eric256 (Parson) on Apr 19, 2006 at 22:02 UTC

    Is that a 5" or 3"? ;)


    ___________
    Eric Hodges
      Back when I was a Mac technician I used to gloat to my PC technician friends about how I could go to any Mac site with just an external scsi drive and a few cables. They used to have a second briefcase just for boot floppies and installer floppy sets.

      Surely these days there's nothing that doesn't work with a USB 1.1 thumbdrive? Of course some organisations lock down the system so you can't use removable mass storage (and floppies are certainly not mass anything).

      If you really only have access to a floppy drive, you could try something like the Sandisk Smartmedia Reader Flashpath Floppy Adapter or the Sony Memory Stick 3.5" flopppy adapter and get access to larger storage via a floppy drive. I would imagine that performance should be at least no slower than a regular floppy.

        I feel a strange need to explain myself...
        First off, I think this is a cool exercise.
        Second, you use what you have, especially if there isn't room in the budget or you have no control of the budget.
        Third, I do plan to move this to a bootable CD-ROM with all my other tools like Norton Ghost, Partition Magic, Sysprep, etc... Right now we don't have time because of recent builds, trade shows, and other more pressing projects.

        Basically I just wanted to make my work a little more efficient, and it worked. I do appreciate the help, though.

      You forgot the little known 3" format :)


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
      I remember working with 8" floppies on a Wang machine back in the '80s. Did they ever make them bigger than that?
        According to Wikipedia, that was the biggest size. "The result was a read-only, 8-inch (20 cm) floppy they called the "memory disk", holding 80 kilobytes". Heh.

        I seem to remember seeing 12" disks as well somewhere, but I might be confusing them with vinyl. But no, they really existed!

        <joke>Great, this is Justin_BSI's first post here and you start talking about the size of your Wang</joke>
        Yes, IBM had a 12" version.

        Well I recall wokring on CP/M and MP/M machines and Intel development systems that all had 8" drives. Initially Shugart single sided drives, but as time went on, double sided, double density, high density and half-height drives became common. Of course once the IBM-PC popularised 5 1/4" drives it was all over for the 8" types.

        jdtoronto

Re: Perl Module Stripping
by stonecolddevin (Parson) on Apr 20, 2006 at 04:53 UTC
    whoa...this node is a little to risque for me...;-)
    meh.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2022-11-26 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?