Diab,

from my - very limited - experience with inheriting PDL
(PDL::IO::Nifti), I end using the native piddle ($myvar->{PDL}) for
everything than the most basic operations; I've wrapped that into a
method. Is this an acceptable work around for your use case? The
left-hand side will always have to accept a plain piddle, but it is
predictable.
Ingo
Now, what about using Moose accessor methods to default to $myval->{PDL}?

On 10/24/2016 07:30 PM, Chris Marshall wrote:
> Thanks for the additional clarification for context---what a mess!
>
> From your example, it seems that the current PDL approach for OO via
> "has-a" doesn't work but my question is what method would work?  Is
> there an example of an OO language or framework that can be shown to
> work for this type of problem?  Is the problem with PDL, perl5, both,
> neither?
>
> --Chris
>
> On Mon, Oct 24, 2016 at 12:51 PM, Diab Jerius <djer...@cfa.harvard.edu
> <mailto:djer...@cfa.harvard.edu>> wrote:
>
>     On Mon, Oct 24, 2016 at 12:43 PM, Diab Jerius
>     <djer...@cfa.harvard.edu <mailto:djer...@cfa.harvard.edu>> wrote:
>     > initialize() currently must assume that object construction can be
>     > done without any arguments to the constructor.  That's inappropriate
>     > in some instances (as described above).
>
>     And once more, to clarify...
>
>     initialize() is not passed any context, so must assume that object
>     attributes have defaults which are context independent.  This is not
>     always appropriate.
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> pdl-devel mailing list
> pdl-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-devel


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to