Hi Matt,
Matt wrote:
> I've never sent to a mailing list like this before so excuse me if I do
> something 'out-of-order'(?)
no, don't worry. Your post is just fine.
> I'm trying to get my newly created IRC bot written in perl to work on my
> router (Linksys WRT)
> with the OpenWRT system, MIPS architecture. Anyone know how I might go about
> this? I've
> googled a bit and played with a few things but I'm afraid this is beyond my
> ability.
> The system is very limitted in space, so installing a full blown parl or
> perl with the modules is
> not an option really.
>
> ANY help would be greatly appreciated!
>
> Error:
> [EMAIL PROTECTED]:~# ./bot
> ./bot: 1: Syntax error: "(" unexpected
>
> here's the uname if that's helpful:
> [EMAIL PROTECTED]:~# uname -a
> Linux OpenWrt 2.4.30 #1 Sat Feb 3 13:16:08 CET 2007 mips unknown
Well, the purpose of PAR::Packer (and pp) is to generate a binary which
includes all dependencies necessary to run on the same platform (but a
different machine, possibly without perl) as the one it was created on.
This means that in order to run a pp-packaged program on your router,
you need to set up a perl with PAR::Packer installed on the same OS and
architecture. Then, you can package the program and run it on the target
system.
However, the resulting binaries are rather big since they are basically
just zip files of all dependencies, including perl itself. Furthermore,
upon execution, the contents are written to a cache directory on disk.
So if you very are limited in hard-drive space, you should probably look
elsewhere for a solution to your problem.
The most space-effective solution using pp/PAR is, if you have several
perl programs, to package them into .par files (-p option to pp), then
"pare"* them down so the do not contain duplicate modules, then run them
with the same copy of parl as "parl foo.par" and "parl bar.par". But
again, if parl is already too big for your system, you might have
trouble getting any perl application to work at all!
Best regards,
Steffen
* The "pare" tool is part of the PAR::Packer distribution. It's not
installed by default. You can find it in the contrib/ subdirectory of
the source distribution.