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

I see your point.

If I've several groups of variables (other than chapters), I would have to have a module for each group e.g. Chapters.pm, Authors.pm, References.pm.

To avoid that, I have a module that stores all the different groups of variables. To help me organise the code, I use a hash reference for each group e.g. $chapters, $authors, etc (so $chapters stores all the chapter information, $authors stores all the author information, etc)

Hm...don't know. Does that sound strange or silly?

Replies are listed 'Best First'.
Re^5: How not to use "our"?
by JavaFan (Canon) on Nov 30, 2010 at 16:39 UTC
    You don't need a different module for each group (Well, "module" is a very loose definition, so what follows you may consider different modules. But it's all can be one file):
    package Whatever; # Really, whatever. Can even omit this line. use strict; use warnings; # # Chapters go here # $Chapter::one = 'Chapter 1'; $Chapter::two = 'Chapter 2'; # # Authors go here # $Author::LW = 'Larry Wall'; $Author::KV = 'Kurt Vonnegut'; # # References go here # $Reference::foo = 'Over there -->'; $Reference::bar = 'Switch doors!'; $Reference::baz = 'Yesteryear';