stvn has asked for the wisdom of the Perl Monks concerning the following question:

In TheDamian's OO Perl book he talks about using Tie::SecureHash to enforce object attribute accessing rules during development, and then turning on "fast" mode for production to avoid the performance hit.

Has anyone out there actually used this technique? And if so, could you please share your experiences?

I am thinking of integrating this into our "house" methodology where I work, so work and team-related experience is especially appreciated.

Thanks in advance,

-stvn
  • Comment on Has anyone ever really used Tie::SecureHash?

Replies are listed 'Best First'.
Re: Has anyone ever really used Tie::SecureHash?
by diotalevi (Canon) on Jan 15, 2004 at 05:25 UTC
    What about policy and procedure? This is a social problem being solved with technology.

      Actually, its not the social problem I am trying to solve. We are a very communicative group and will encourage that to be so with all our new hires. What I am trying to solve is the issue of mis-typing bugs and other insidious things that can happen as a project grows. To be honest, I have been thinking of doing something like this in projects that only I am working on too. Agility is the name of the game these days, and anything that reduces debugging time and therefore increases productivity is a good thing IMO.

      I do not believe that the ideas behind encapsulation in languages like C++ and Java are there to solve a social issue. Just as tools like CVS are there not to solve social issues, but instead to better the development process. And all I am trying to do is add another tool to our toolbox to help us to program in a more reliable, bug free way. Its more of a "use warnings" thing, not a "use strict" thing, if you get what i mean.

      Also, I like very much what TheDamian said in Re: Re: Re: Tie::SecureHash and AUTOLOAD'ing:

      encapsulation is not about preventing access to attributes; it's about controlling access to attributes

      -stvn