[my apologies, forgot to send to list]
---------- Forwarded message ---------- From: Diab Jerius <[email protected]> Date: Fri, Oct 7, 2016 at 3:56 PM Subject: Re: [Pdl-general] Read only piddles? To: Bruce Ravel <[email protected]> On Fri, Oct 7, 2016 at 1:20 PM, Bruce Ravel <[email protected]> wrote: > On 10/07/2016 12:27 PM, Diab Jerius 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? > > > You might consider making your piddles the attributes of a Moose object (or > something similar), then modifying the accessor functions in some way that > allows the end user to change the piddle contents without changing the > functional relationships. That wouldn't really provide actual protection > form someone hell-bent on breaking your code, but it would deter the casual > user. > > HTH, > B > Unfortunately, for performance reasons the actual piddle needs to be accessible. I'm worried more about inadvertent mutation, rather than evil geniuses. ------------------------------------------------------------------------------ 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
