title: Perl 1,000 subroutine redefined
body: <p>I have a Perl script which uses <a href="http://search.cpan.org/perldoc?Module%3a%3aReload%3a%3aSelective" rel="nofollow">Module::Reload::Selective</a> to load a module. The perl script looks like this, more or less.</p>
  
  <pre><code>#!/usr/bin/perl
  
  use strict;
  use warnings;
  use Module::Reload::Selective;
  
  &amp;reload;
  
  sub reload {
      Module::Reload::Selective-&gt;reload(qw(myModule));
      import myModule qw($reloadtime);
      $reloadtime = ${myModule::reloadtime};
  }
  </code></pre>
  
  <p>The module looks like this:</p>
  
  <pre><code>package myModule;
  
  use Config::General;
  use Data::Dumper;
  use DBI;
  use HTTP::Request::Common qw { POST };
  use HTTP::Headers;
  use JSON::XS;
  use LWP::UserAgent;
  use Module::Pluggable search_path =&gt; "Bot";
  use POSIX qw(strftime ceil);
  
  # stuff here
  1;
  </code></pre>
  
  <p>When I run the main script I get about 100 like this:</p>
  
  <pre><code>Subroutine export_fail redefined at /usr/local/share/perl/5.14.2/Carp.pm line 64.
  Subroutine _cgc redefined at /usr/local/share/perl/5.14.2/Carp.pm line 66.
  Subroutine longmess redefined at /usr/local/share/perl/5.14.2/Carp.pm line 72.
  Subroutine shortmess redefined at /usr/local/share/perl/5.14.2/Carp.pm line 92.
  Subroutine croak redefined at /usr/local/share/perl/5.14.2/Carp.pm line 100.
  Subroutine confess redefined at /usr/local/share/perl/5.14.2/Carp.pm line 101.
  Subroutine carp redefined at /usr/local/share/perl/5.14.2/Carp.pm line 102.
  </code></pre>
  
  <p>I noticed if I comment out some of the "use" statements in my module these will go away. But I need those. I've searched all over and tried a number of things. to no avail.</p>