in reply to Re: redefining Internals::SvREADONLY
in thread redefining Internals::SvREADONLY

I knew I was going to get a response like this. I know PERL's attitude towards enforced privacy and I'd agree that in general its a good approach. However in this situation we really need this data structure read-only. We have had so many hard to trace bugs because developer A changed some variable (sometimes inadvertently) that then screwed developer B. And then finger pointing and hate mongering ensues. The developer who went and made the DS writable was certainly breaking the rules. I was just wondering if there was a way to really enforce the rules this time. And more specifically I was trying to learn some details about the Internals package and what might happen if I start messing with it.

Replies are listed 'Best First'.
Re^3: redefining Internals::SvREADONLY
by BrowserUk (Patriarch) on May 05, 2010 at 23:52 UTC
    We have had so many hard to trace bugs because developer A changed some variable (sometimes inadvertently) that then screwed developer B...The developer who went and made the DS writable was certainly breaking the rules.

    Setting the data structure writable can't be done "inadvertently".

    If it happens once; you put it down to 'didn't know better', admonish the guy and move on.

    If it happens twice; you put it down to 'thinks he know better', give the guy a written formal warning that any repetition will be considered deliberate sabotage, and result in both dismissal, and reporting to the authorities with a view to criminal prosecution.

    And more specifically I was trying to learn some details about the Internals package and what might happen if I start messing with it.

    Anything you can do--your malicious programmer can undo. Far better to be rid of the problem than chase a protracted technological arms race.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^3: redefining Internals::SvREADONLY
by ww (Archbishop) on May 05, 2010 at 23:38 UTC
    I think before you start "messing" about with the "Internal package" you need to think how you'll sandbox your changes until they're proven acceptable.

    And regardless of whether the dev who changed the DS +r was willfully "breaking the rules" or merely ignorant thereof, you have a discipline problem; not a Perl problem, IMO. That's an opinion furthered by your reference to "finger pointing and hate mongering" -- as that's hardly a sign of community values that will help your organization achieve its goals.

    In short, I have to go with BrowserUk's observation, "the threat of the sack...," or, in Americanized form, "Someone with sufficient authority to do so (you?) needs to tell this sucker that you won't need and won't use his/her services if s/he fails to respect the organization's rules and standards."

    Life, human and corporate, is too brief to waste time on aggravations like this.

Re^3: redefining Internals::SvREADONLY
by ikegami (Patriarch) on May 06, 2010 at 00:26 UTC

    I was trying to learn some details about the Internals package

    The functions are implemented in universal.c.