in reply to Proper way to create 'globals'

Globals suck. Make a method which returns that data. Zing, now it's accessible to all subclasses, it's encapsulated behind a nice interface, and it's not stompable elsewhere by accident.

Replies are listed 'Best First'.
Re^2: Proper way to create 'globals'
by Beechbone (Friar) on Feb 08, 2007 at 08:35 UTC
    Your reply does not help at all. Maybe read the question again?

    Hint: Just replace every "$ts->{info}" in the question with "$ts->info()" while reading...


    Search, Ask, Know

      I can read just fine, thank you. I said "globals suck". Perhaps I should have been more explicit to say "passing parameters is much better, and I think you'll appreciate that design more in the future if you have to make further changes."