4 if( $ENV{PERL_CORE} ) {
16 # ModuleName => q|code to check that it was loaded|,
17 'Cwd' => q| ::is( ref Cwd->can('fastcwd'),'CODE' ) |, # 5.7 ?
18 'File::Glob' => q| ::is( ref File::Glob->can('doglob'),'CODE' ) |, # 5.6
19 'SDBM_File' => q| ::is( ref SDBM_File->can('TIEHASH'), 'CODE' ) |, # 5.0
20 'Socket' => q| ::is( ref Socket->can('inet_aton'),'CODE' ) |, # 5.0
21 'Time::HiRes'=> q| ::is( ref Time::HiRes->can('usleep'),'CODE' ) |, # 5.7.3
23 plan tests => keys(%modules) * 2 + 3
32 can_ok( 'XSLoader' => 'load' );
33 #can_ok( 'XSLoader' => 'bootstrap_inherit' ); # doesn't work
35 # Check error messages
36 eval { XSLoader::load() };
37 like( $@, '/^XSLoader::load\(\'Your::Module\', \$Your::Module::VERSION\)/',
38 "calling XSLoader::load() with no argument" );
40 # Now try to load well known XS modules
41 my $extensions = $Config{'extensions'};
42 $extensions =~ s|/|::|g;
44 for my $module (sort keys %modules) {
46 skip "$module not available", 2 if $extensions !~ /\b$module\b/;
47 eval qq| package $module; XSLoader::load('$module'); | . $modules{$module};
48 is( $@, '', "XSLoader::load($module)");