On Thu Jan 21 21:16:01 2010, RSAVAGE wrote:
Show quoted text> Hi
>
> This is under Perl 5.10.0 in Debian stable.
>
> At line 44 of V 1.24 and line 46 of V 1.28, we have:
>
> my $HAVE_XS = eval "use Cache::Memcached::GetParserXS; 1;";
>
> This should say eval "require...";
>
> The symptom is that it attempts to load Cache::Memcached::GetParserXS
> when it is /not/ installed, a couple of lines down, at:
>
> my $parser_class = $HAVE_XS ? "Cache::Memcached::GetParserXS" :
> "Cache::Memcached::GetParser";
>
> despite the fact that $HAVE_XS is false.
>
> No, we can't explain it either :-(.
>
> Cheers
FWIW, testing the segment you referenced from version 1.28, on a Mac, it's working properly.
I extracted the block to the following test script:
#!/usr/bin/perl
use strict;
my $HAVE_XS = eval "use Cache::Memcached::GetParserXS; 1;";
$HAVE_XS = 0 if $ENV{NO_XS};
my $parser_class = $HAVE_XS ? "Cache::Memcached::GetParserXS" :
"Cache::Memcached::GetParser";
if ($ENV{XS_DEBUG}) {
print "using parser: $parser_class\n";
}
printf("HAVE: [%s]\n", $HAVE_XS);
printf("Class: [%s]\n", $parser_class);
and received the following when running:
[~/Desktop]$ ./test.pl
HAVE: []
Class: [Cache::Memcached::GetParser]