I don’t think that there is at the moment.
It might be possible to mark a PDL read-only to prevent modification of its
contents, but modification as you describe involves a Perl-level change to the
variable: putting a new value in the variable is not something that PDL
controls.
You could make a Perl copy of the PDL and hand *that* off:
$tmp = $my_pdl;
untrusted($tmp);
> On Oct 7, 2016, at 10:27 AM, Diab Jerius <[email protected]> wrote:
>
> I've got an application where I need to maintain a functional
> relationship between several piddles, but need to hand them over to
> untrusted code which will destroy that relationship if the piddles are
> modified.
>
> Is there any means of marking a piddle as read only?
>
> Thanks,
>
> Diab
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> pdl-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pdl-general
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general