Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Adding modules to a PC manually

by SeigePerlous (Novice)
on Oct 15, 2011 at 20:15 UTC ( [id://931695]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Adding modules to a PC manually
in thread Adding modules to a PC manually

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"

Replies are listed 'Best First'.
Re^4: Adding modules to a PC manually
by syphilis (Archbishop) on Oct 16, 2011 at 00:09 UTC
    It appears the only file ppm downloaded was Util.pm into my PDL folder

    That's fine, so long as the dependencies listed under PREREQ_PM in the Makefile.PL are met.
    PDL::Util is pure perl and Util.pm is the only file needed for PDL::Util to be functional.
    This works ok for me on MS Windows (version 0.010 of PDL::Util):
    use strict; use warnings; use PDL; use PDL::Util 'add_pdl_method'; add_pdl_method({'getArray' => 'unroll'}); print "OK\n";
    (Btw, the the perldl mailing list is an excellent resource for PDL issues.)

    Cheers,
    Rob

    UPDATE: For the latest and most "feature-packed" versions of PDL (via PPM), including the latest devel release, refer to the wiki entry on installing PDL on Windows.
Re^4: Adding modules to a PC manually
by Marshall (Canon) on Oct 15, 2011 at 20:32 UTC
    ppm connects over the internet in the default mode.

    I you do not have interned connectivity, then you have to go find the .ppd file, download it yourself. Then you can use ppm to install it. look at: ppm 10xx. If that doesn't work search for PDL .ppd or other variations on this theme. Get the .ppd file onto your machine locally via "sneaker net" or whatever and then use ppm.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://931695]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-03-28 14:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found