It is essential that, if you are using ActiveState and its package-system, you must confine yourself to using that system: do not muddy-the-waters either with CPAN or with direct installs from .gz files. (The packaging system would thereby be caused to lose track of what is actually happening, of course, and much entirely-avoidable grief would ensue.) Even if you must “sneaker-net” the package files to a computer that has no network connectivity at all, you must install packages, and nothing else.
| |
This makes great sense but what do I do when I am using ActiveState and ppm does not install PDL correctly? I have to find some way of "fixing" the install and I've found nothing to date.
| [reply] |
Download the package in another computer connected to internet in the desired extension (probably a .zip file), copy to a pendrive, take the pendrive to your house, then extract and install the package in your system with something like this:
unzip a_package.zip
cd /a_package
perl Build.pl
| [reply] |
No this is not right if this is an Active State installation.
An Active State module is completely compiled and "read to go " module for Windows (or actually Lunix or OS X) is a .ppd file. Down load that file to a jump drive, CD, DVD or whatever.
type>ppm help install
basically: ppm> install X:\module.ppd
where X:\ is the jump drive or CD root
Things are more complicated if you are not using Active State. The Active State .ppd file is "ready to go" - no nmake or compiler is needed. No build process. You are done in less than a minute. Some big critters will require more .ppd files that the target .ppd file depends upon. If that happens, then download more .ppd files, on the same media and ppm will find them - rinse repeat.
There are multiple repositories for .ppd files, the largest in on the Active State site.
Building an Active State .ppd yourself can be mess, but it usually not necessary. You have to have the right compiler (VC6 or mingw) and that can be a mess. These are available as a download able .ppd, but I strongly recommend against it. Go with the flow and do the easy thing.
| [reply] |
It appears the only file ppm downloaded was Util.pm into my PDL folder. There is no .ppd file. I have copied this file to the target computer's PDL folder but my script still tells me it can't find it.
There is documentation on Util that says "PDL::Util does not export anything by default. A list of symbols may be imported as usual. The exportable symbols come in two types, functions (tag :function) and methods (tag :methods). The word methods here is a strange word. When importing symbols one does not import methods. In this context a 'method' is a function which expects a piddle as its first argument. However, there is a reason ...
If an array reference or hash reference is passed as the last item in the import list, the reference will be passed to the add_pdl_method function below, in which case these functions are imported into the PDL namespace and may be used as method calls. Note, when doing this for symbols from the PDL::Util module, only those listed in the :methods tag may be added as a method (this is the origin of the confusing terminology). "
I tried adding PDL::Util::add_pdl_method({'getArray' => 'unroll'}); but then I get the error "Referenced methods or constants a package doesn't define: Util::add_pdl_method"
| [reply] [d/l] |