'sprintf' is not recognized as an internal or external command, operable program or batch file.
Leo Susanto <[email protected]> Wed, 6 Apr 2011 15:11:25 -0700
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
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'});
$v = qx( $line );
} else {
$v = qx($mysqladmin version);
}
I can reproduce this on the latest ActiveState Perl 5.12.3 (1204) too.
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/[email protected]