title: Is there a way to override a Perl "use constant" in your unit testing?
body: <p>I have a Perl module that I have declared some constants:</p>
  
  <pre><code>use constant BASE_PATH =&gt; "/data/monitor/";
  </code></pre>
  
  <p>In live operation the constant will <strong>never</strong> change but I wish to be able to modify it in my unit tests, e.g. to set it to <code>~/project/testdata/</code>.  Is there a way do do this without having to use global mutable variables?</p>
  
  <p>Could I possibly use <code>Test::MockObject</code> on the <code>constant</code>?</p>