note
Corion
<p>I think this comes from a module that uses (resp. inherits from) [mod://Exporter] and where <c>Module::Name->import</c> is called with <c>method_name</c> as argument. The simplest case would be:</p>
<c>
use Module::Name 'method_name';
</c>
<p>... but that's likely too obvious and you've tried that already. A more contrived way would be something like:</p>
<c>
my $module = 'Module::Name';
require 'Module/Name.pm';
$module->import('method_name');
</c>
<p>Maybe (<i>maybe</i>) your code is picking up the wrong versions of <c>Module::Name</c> somewhere else in <c>@INC</c>? Dumping <c>\%INC</c> might tell you which version got picked up.</p>
<p>The easiest "fix" in my opinion would be to preload all the relevant modules at the very top of your program:</p>
<c>
#!perl -w
use strict;
use Module::A;
use Module::B;
use Module::Name 'method_name';
...
</c>
<p>That way, all the modules should be loaded in the correct order...</p>
1157011
1157011