On Sun, Sep 5, 2010 at 8:22 PM, Craig DeForest
<[email protected]> wrote:
> Easiest way:
>
> begin {package foo; use PDL; }
>
> Will export all those routines to foo rather than main.  I have not tried 
> setting foo to 'PDL'.


Thanks Craig. I will try the above. That might do the trick for now.

I realized (while on a bike ride outside), that all this would be a
non-issue if all PDL methods were strictly object methods. Perhaps,
the developers can think of a pragma for the next version that would
enforce that. That way there would never be any methods exported, and
never any collision.


>
> (Mobile)
>
>
> On Sep 5, 2010, at 6:33 PM, P Kishor <[email protected]> wrote:
>
>> On Sun, Sep 5, 2010 at 5:31 PM, Chris Marshall <[email protected]> wrote:
>>>> Hi Chris, I know you want to lead me to the answer, but I am not sure
>>>> where you are pointing me to. I have looked at "help PDL" and "perldoc
>>>> PDL" and the only item of relevance to me here I see is
>>>>
>>>> "Exports
>>>> use PDL; exports a large number of routines into the calling
>>>> namespace. If you want to avoid namespace pollution, you must instead
>>>> use PDL::Lite, and include any additional modules explicitly."
>>>
>>> If you want to avoid namespace pollution, you must instead
>>> use PDL::Lite, and include any additional modules explicitly.
>>
>>
>> Seems like you told me what I have already read but haven't found helpful.
>>
>> Let me explain again... I use a module that has defined methods called
>> 'any' and 'get'. Now, when I use PDL, those methods get redefined. It
>> really doesn't matter whether I 'use PDL' or 'use PDL::Lite' and then
>> 'use PDL::Basic' and 'use PDL::Ufunc' and 'use PDL::Core'. What is
>> needed is a way to import PDL commands into a custom namespace... the
>> best would be to have them all available as PDL::* as that would
>> ensure I will never have any collision with any package ever.
>>
>>




-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to