Subject: | Useless use of concatenation (.) or string in void context under Module::Build |
Hi,
I am getting the error
Useless use of concatenation (.) or string in void context at
/home/perl/share/perl/5.8.7//Config/General/Interpolated.pm line 94.
when running
perl Build test
under Module::Build for modules that use Config::General and set
InterPolateVars or InterPolateEnv.
mark $ cat Build.PL
use strict;
use warnings;
use Module::Build;
my $builder = Module::Build->new(
dist_name => 'test_config_general',
dist_author => 'Mark Clements <badgersrc@cpan.org>',
dist_version => "0.1",
dist_abstract => "test Config::General",
build_requires => { 'Test::More' => 0, },
);
$builder->create_build_script();
mark $ perl Build.PL
Deleting Build
Removed previous script 'Build'
Creating new 'Build' script for 'test_config_general' version '0.1'
mark $ cat t/config_general.t
use strict;
use warnings;
use Config::General;
use Test::More qw(no_plan);
my $config = Config::General->new(
-ConfigFile => q(test.conf),
-InterPolateVars => 1,
# -InterPolateEnv => 1,
);
ok($config);
mark $ perl Build test
t/config_general....Useless use of concatenation (.) or string in void
context at /home/perl/share/perl/5.8.7//Config/General/Interpolated.pm
line 94.
t/config_general....ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.06 cusr + 0.01 csys = 0.07 CPU)
mark $ cat test.conf
test = 1
mark $
Running the script on its own works as expected:
mark $ perl t/config_general.t
ok 1
1..1
I cannot reproduce this warning without using Module::Build. This
problem is appears to be related to
http://rt.cpan.org/Ticket/Display.html?id=14770, although the fix
mentioned there has been applied to 2.31 (according to the release notes
and the code itself).
regards,
Mark