7 Apr 2011 00:11
'sprintf' is not recognized as an internal or external command, operable program or batch file.
Leo Susanto <leosusanto <at> gmail.com>
2011-04-06 22:11:25 GMT
2011-04-06 22:11:25 GMT
Hi,
I am trying to make the makefile with the option of inserting
testuser, testpassword and testhost into "perl.exe Makefile.PL"
command line, but I keep getting "'sprintf' is not recognized as an
internal or external command, operable program or batch file."
C:\CPANTesters\Perl5.10.0\cpan\build\DBD-mysql-4.018-d8v5HG>perl.exe
Makefile.PL INSTALLDIRS=site --testuser=cpantesters
--testpassword=cpantesters --testhost=localhost
'sprintf' is not recognized as an internal or external command,
operable program or batch file.
Problem running C:\CPANTE~1\bin\MYSQL-~1.11-\bin\MYSQLA~1.EXE - aborting ...
I trace it down and this is the part of Makefile.PL that doesn't work.
my $v;
if ( defined $opt->{'testuser'} and defined $opt->{'testpassword'}) {
$v = qx( sprintf('%s --user=%s --password=%s version',
$mysqladmin , $opt->{'testuser'}, $opt->{'testpassword'}) );
} else {
$v = qx($mysqladmin version);
}
Taking the sprintf() out of qx() works.
my $v;
if ( defined $opt->{'testuser'} and defined $opt->{'testpassword'}) {
my $line = sprintf('%s --user=%s --password=%s version',
$mysqladmin , $opt->{'testuser'}, $opt->{'testpassword'});
(Continue reading)
RSS Feed