t/op/cond.t See if conditional expressions work
t/op/defins.t See if auto-insert of defined() works
t/op/delete.t See if delete works
+t/op/die.t See if die works
t/op/die_exit.t See if die and exit status interaction works
t/op/do.t See if subroutines work
t/op/each.t See if hash iterators work
@pods = (<pod/*.pod>);
-%archpms = (Config => 1, FileHandle => 1, overload => 1);
+%archpms = (
+ Config => 1, FileHandle => 1, overload => 1,
+ 'File/Basename' => 1, # uses m//t
+);
if ($^O eq 'dos') {
push(@scripts,'djgpp/fixpmain');
in a function/method name or a failure to C<AutoSplit> the file, say, by
doing C<make install>.
-=item Can't locate file '%s' in @INC
+=item Can't locate %s in @INC
(F) You said to do (or require, or use) a file that couldn't be found
in any of the libraries mentioned in @INC. Perhaps you need to set the
SvREFCNT_dec(namesv);
if (!tryrsfp) {
if (op->op_type == OP_REQUIRE) {
- SV *msg = sv_2mortal(newSVpvf("Can't locate file '%s' in @INC", name));
+ SV *msg = sv_2mortal(newSVpvf("Can't locate '%s' in @INC", name));
SV *dirmsgsv = NEWSV(0, 0);
AV *ar = GvAVn(incgv);
I32 i;
print "1..0\n";
exit;
}
+
+ use strict;
+
my @incpath = (split(/\s+/, $Config{usrinc}), split(/\s+/ ,$Config{locincpth}));
my %done = ();
my %define = ();
sub process_file {
- my($file) = @_;
+ my($file,$level) = @_;
return unless defined $file;
return if exists $done{$path};
$done{$path} = 1;
- unless(defined $path) {
+ if(not defined $path and $level == 0) {
warn "Cannot find '$file'";
return;
}
+ local(*F);
open(F,$path) or return;
+ $level = 1 unless defined $level;
+ my $indent = " " x $level;
+ print "#$indent open $path\n";
while(<F>) {
s#/\*.*(\*/|$)##;
- process_file($mm,$1)
- if /^#\s*include\s*[<"]([^>"]+)[>"]/;
+ if ( /^#\s*include\s*[<"]([^>"]+)[>"]/ ) {
+ print "#${indent} include $1\n";
+ process_file($1,$level+1);
+ print "#${indent} done include $1\n";
+ print "#${indent} back in $path\n";
+ }
s/(?:\([^)]*\)\s*)//;
- $define{$1} = $2
- if /^#\s*define\s+(\w+)\s+((0x)?\d+|\w+)/;
+ if ( /^#\s*define\s+(\w+)\s+(\w+)/ ) {
+ print "#${indent} define $1 $2\n";
+ $define{$1} = $2;
+ }
}
close(F);
+ print "#$indent close $path\n";
}
process_file("sys/sem.h");
process_file("sys/ipc.h");
process_file("sys/stat.h");
- foreach $d (@define) {
+ foreach my $d (@define) {
while(defined($define{$d}) && $define{$d} !~ /^(0x)?\d+$/) {
$define{$d} = exists $define{$define{$d}}
? $define{$define{$d}} : undef;
}
unless(defined $define{$d}) {
- print "0..0\n";
+ print "# $d undefined\n";
+ print "1..0\n";
exit;
- };
- ${ $d } = eval $define{$d};
+ }
+ {
+ no strict 'refs';
+ ${ $d } = eval $define{$d};
+ }
}
}