in reply to Best way to dynamically use a .pm?

Why put configuration data in Perl modules? What's wrong with using a configuration file? At least that allows editing by "untrusted" people.

Replies are listed 'Best First'.
Re^2: Best way to dynamically use a .pm?
by TJPride (Pilgrim) on Nov 28, 2011 at 21:05 UTC
    I'm the only one editing the system, so that doesn't really matter, at least for now. But can you give an example of how a config file is different from a Perl module? If it's a superior way to organize my code and as simple to use as require, I'm open-minded.
      Uhm, a configuration file doesn't execute code? A typo in a configuration file doesn't prevent the program from compiling? For a configuration file, you wouldn't have had the need to ask how to dynamically use it? Differences enough for you?

      Whether it's superior enough, I do not know. It's your program after all.