perlquestion
danmcb
<p>I am using a module and passing a parameter to it in the use statement. The module is part of a Catalyst test harness. But the import routine never gets called.</p>
<p>When I do the same thing in a simple module (i.e. not part of Catalyst stuff) it works fine.</p>
<p>My code:</p>
<code>
package test_setup;
use strict;
use warnings;
our $data_file;
sub import {
my ($package, $df) = @_;
# we never get here
$data_file = $df if defined $df;
}
# etc
1;
</code>
<p>And the test file:</p>
<code>
use strict;
use warnings;
use t::test_setup qw/ file_name /;
use Test::More tests => 6;
#etc
</code>
<p>Any idea what could cause this?</p>