<?xml version="1.0" encoding="windows-1252"?>
<node id="994071" title="Re: Refactoring conf-driven app into a module; what to do with the config?" created="2012-09-17 14:27:53" updated="2012-09-17 14:27:53">
<type id="11">
note</type>
<author id="616540">
moritz</author>
<data>
<field name="doctext">
&lt;p&gt;First of all you should be clear about "config file" versus "data file". If another user installs the same module on another machine, will he have to adapt some of those values? If yes, it's config. If not, it's data.

&lt;p&gt;Second point: Just because it's a module doesn't mean that by some magic it shouldn't have to have configuration or data files. There are good use cases for those. So I'm not quite sure what your question is. Yes, I have written code that depended on data files and configuration files. Yes, one can handle that.&lt;/p&gt;

&lt;p&gt;If your module has a build system similar to most CPAN modules, [mod://File::ShareDir] can help you locating the files.&lt;/p&gt;

&lt;p&gt;The needs regarding configuration can vary drastically by application, but they have in common that for most needs CPAN already has a solution.&lt;/p&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-616540"&gt;
[http://perl6.org/|Perl 6 - the future is here, just unevenly distributed]
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
994067</field>
<field name="parent_node">
994067</field>
</data>
</node>
