title: What is good way share reloadable config parameters for perl scripts
body: <p>I have a lot of small Perl daemons with a common configuration.</p>
  
  <p>Currently, I use this to load the settings:</p>
  
  <p>In myconfig.pm:</p>
  
  <pre><code>package MyConfig;
  use base 'Exporter';
  
  BEGIN {
      our @EXPORT = qw( $DB_DSN $DB_USER $DB_PWD );
  }
  
  our @EXPORT;
  use vars @EXPORT;
  
  $DB_DSN = "DBI:mysql:...";
  $DB_USER = 'asdad';
  ...
  </code></pre>
  
  <p>And in daemon.pl:</p>
  
  <pre><code>use MyConfig;
  </code></pre>
  
  <p>This works just fine. But now I have the new requirement to reload the configuration when the <code>USR1</code> signal is received. I know about</p>
  
  <pre><code>$SIG{"USR1"} = sub { ... }
  </code></pre>
  
  <p>but what next? <code>use MyConfig</code> again? Looks mad.</p>
  
  <p>My scripts have to run on many different platforms and different perl versions from 5.8 to modern, so I'm trying to avoid CPAN modules.</p>
  
  <p>Please point me to good solution about this task.</p>