Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: How not to use "our"?

by PeterPeiGuo (Hermit)
on Nov 29, 2010 at 14:58 UTC ( [id://874262] : note . print w/replies, xml ) Need Help??

in reply to Re: How not to use "our"?
in thread How not to use "our"?

A quick comment/addition to the first two paragraphs: in cases where the common values are constant (or near-constant), one alternative is to wrap those values in a class and provide accessors. This provides commonly available values without global.

Peter (Guo) Pei

Replies are listed 'Best First'.
Re^3: How not to use "our"?
by JavaFan (Canon) on Nov 29, 2010 at 15:44 UTC
    You're just replacing global scalars with global subs.

    Except for slowing down your code and making it longer, that isn't much of an improvement.