in reply to config file vs. __DATA__

Don't do whatever the "concensus" is of the at most few dozen replies you get here. Do whatever you feel comfortable with. If __DATA__ works for you, hey, all the more power to you. Perl is about making more than one way available to you. Don't be a sheep and let others decide, decide yourself.

Abigail

Replies are listed 'Best First'.
Re: Re: config file vs. __DATA__
by bluto (Curate) on Apr 23, 2003 at 15:46 UTC
    Abigail is right. I use __DATA__ if I can get away with it and it won't make my life difficult later. Most of the times I can't since the scripts I write tend to be installed and reinstalled on different machines requiring different configurations, and I don't want to edit the script each time I install. You may even be able to use both methods at the same time in some cases (i.e. use a config file if it exists, or use __DATA__ if it doesn't).
Re: Re: config file vs. __DATA__
by glwtta (Hermit) on Apr 23, 2003 at 20:13 UTC
    Doesn't that generally defeat the point of asking for advice? :)

    I don't know, I've found there's something to be said for doing what others tend to do, "best practices" and all that. I think this "individualism" (doing something differently just for the sake of not being a "sheep") contributes to Perl's (partially earned) rep for being hard to collaborate on and hard to maintain.

      No, I wouldn't have said it if the poster asked "what do you do, and why?". But the poster was asking for concensus, leaving me with the feeling (s)he'd go with whatever got the most votes.

      Abigail