From: Gurusamy Sarathy Date: Sat, 16 May 1998 21:27:18 +0000 (+0000) Subject: [win32] merge changes#989,990,992 from maintbranch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=38b8243ab0d66a9a580a7dbf933f909a51f9cc79;hp=21b24fed243b3f9c67f84676302e2977a490e45d;p=p5sagit%2Fp5-mst-13.2.git [win32] merge changes#989,990,992 from maintbranch p4raw-link: @992 on //depot/maint-5.004/perl: 939cd61b8f2cacc306672f95f1fdd75c8a467988 p4raw-link: @990 on //depot/maint-5.004/perl: 8025562d4dc1786ce758f6f408dd237fc4eca71e p4raw-link: @989 on //depot/maint-5.004/perl: 7ba7701dce644462ff1139b413d24e4f7004bf2e p4raw-id: //depot/win32/perl@1004 --- diff --git a/MANIFEST b/MANIFEST index 1bd0206..83081ac 100644 --- a/MANIFEST +++ b/MANIFEST @@ -828,6 +828,7 @@ t/op/cmp.t See if the various string and numeric compare work 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 diff --git a/installperl b/installperl index a8bcd35..011c8be 100755 --- a/installperl +++ b/installperl @@ -46,7 +46,10 @@ if ($Is_VMS) { @scripts = map { "$_.Com" } @scripts; } @pods = (); -%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'); diff --git a/pod/perldiag.pod b/pod/perldiag.pod index cd4c876..d515517 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -670,7 +670,7 @@ but there is no function to autoload. Most probable causes are a misprint in a function/method name or a failure to C the file, say, by doing C. -=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 diff --git a/pp_ctl.c b/pp_ctl.c index 55881de..ede74b5 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2463,7 +2463,7 @@ PP(pp_require) 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; diff --git a/t/op/die.t b/t/op/die.t new file mode 100755 index 0000000..795d856 --- /dev/null +++ b/t/op/die.t @@ -0,0 +1,26 @@ +#!./perl + +print "1..6\n"; + +$SIG{__DIE__} = sub { print ref($_[0]) ? ("ok ",$_[0]->[0]++,"\n") : @_ } ; + +$err = "ok 1\n"; +eval { + die $err; +}; + +print "not " unless $@ eq $err; +print "ok 2\n"; + +$x = [3]; +eval { die $x; }; + +print "not " unless $x->[0] == 4; +print "ok 4\n"; + +eval { + eval { + die [ 5 ]; + }; + die if $@; +}; diff --git a/t/op/ipcmsg.t b/t/op/ipcmsg.t index 98cf8bc..ab2b073 100755 --- a/t/op/ipcmsg.t +++ b/t/op/ipcmsg.t @@ -30,12 +30,15 @@ BEGIN { 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; @@ -51,40 +54,55 @@ BEGIN { 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() { 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}; + } } }