Why is it a bad idea to write configuration data in code?

前端 未结 10 2162
陌清茗
陌清茗 2020-12-05 23:46

Real-life case (from caff) to exemplify the short question subject:

$CONFIG{\'owner\'} = q{Peter Palfrader};
$CONFIG{\'email\'} = q{peter@palfrader.org};
$CO         


        
10条回答
  •  时光说笑
    2020-12-06 00:29

    Reason 1. Aesthetics. While no one gets harmed by bad smell, people tend to put effort into getting rid of it.

    Reason 2. Operational cost. For a team of 5 this is probably ok, but once you have developer/sysadmin separation, you must hire sysadmins who understand Perl (which is $$$), or give developers access to production system (big $$$).

    And to make matters worse you won't have time (also $$$) to introduce a configuration engine when you suddenly need it.

提交回复
热议问题