is it possible to replace xs versions with plain text versions?
In the general case, no. In some cases, there are pure-Perl versions
available, though (which run slower).
What exact problem are you trying to solve? Are you booting from
the LiveCD, and then want to run scripts which come from some other
data source... Or are the scripts included on the LiveCD? Or what?
In case you could somehow supply the appropriate .so files for the
architecture-specific modules (e.g. built on some other comparable
(same architecture) machine), you could put them in some local Perl
library directory...
| [reply] |
Package your scripts with PAR or supply your own perl (which contains what you need) to exec your scripts.
If you know which version of perl you will be using then you can simply do a local install of the modules you need on your development system where you have access to a compiler - say into ~/lib. Then copy ~/lib to the directory containing your scripts and include that with a use lib "./lib" in your scripts. This will give you the "text" part of the modules and the .so parts in the correct locations.
| [reply] [d/l] |
Some modules have a built-in solution for working without XS. The most famous example is Math::BigInt works without XS, but has XS parts separated to three other distributions you can install and then you can ask the module to do the same things faster.
A few other similar modules are Text::Levenshtein and Heap::Simple.
Another module group, Digest, has some hashing methods implemented in pure perl, others in XS, so you can still use e.g. CRC hashing if you don't want to install XS.
I don't exactly know how List::Util and Scalar::Util handle pure perl installations, but both definitely install as an XS module normally and have pure-perl code for most functions as well.
| [reply] |
Hello All,
What exact problem are you trying to solve?
I wrote several scripts which should run on virtually every livecd linux which has perl on board. The scripts works on livecd with full perl like ubuntu and knoppix but many using small distros for recovery like systemrescuecd etc and I am trying to make them work too.
But if I understand correctly, the .so extensions builded for one kernel cannot work with different kernel.
To ship full perl with scripts is not a solution because livecd is for quickly repair, if it required 10 minutes only to find and install perl its better to connect the hdd to other computer instead.
The rebuilding of livecd is not a solution.
The scripts will be available from internet or can be on usb stick.
PAR - I work with PAR several years ago ( but with windows), nice thing. But will it work on _every_ linux? With kernel 2.4, 2.6 ?
use lib - yes , actually I include my and 3-party modules and do unshift @INC in BEGIN block to include this locationin PATH.
the problem with rebuilding /building - if the new version of livecd come I need do it again (?)
thanks for answers, I'll try some your ideas.
| [reply] |