Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: Adding modules to a PC manuallyby SeigePerlous (Novice) |
on Oct 15, 2011 at 20:15 UTC ( [id://931695]=note: print w/replies, xml ) | Need Help?? |
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"
In Section
Seekers of Perl Wisdom
|
|