From: Craig A. Berry Date: Sat, 21 Jun 2003 10:31:59 +0000 (-0500) Subject: FileCache 1.03 broken on VMS -- possible patch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=42bff5bd56ed198158112ff1a7f7240c78970df7;p=p5sagit%2Fp5-mst-13.2.git FileCache 1.03 broken on VMS -- possible patch From: "Craig A. Berry" Message-ID: <3EF47A6F.9060904@mac.com> p4raw-id: //depot/perl@19839 --- diff --git a/lib/FileCache.pm b/lib/FileCache.pm index 2386532..8e1fe44 100644 --- a/lib/FileCache.pm +++ b/lib/FileCache.pm @@ -72,6 +72,7 @@ unless you terminated before repeatedly calling cacheout. require 5.006; use Carp; +use Config; use strict; no strict 'refs'; # These are not C for legacy reasons. @@ -88,7 +89,9 @@ sub import { *{$pkg.'::close'} = \&cacheout_close; # Reap our children - @{"$pkg\::SIG"}{'CLD', 'CHLD', 'PIPE'} = ('IGNORE')x3; + ${"$pkg\::SIG"}{'CLD'} = 'IGNORE' if $Config{sig_name} =~ /\bCLD\b/; + ${"$pkg\::SIG"}{'CHLD'} = 'IGNORE' if $Config{sig_name} =~ /\bCHLD\b/; + ${"$pkg\::SIG"}{'PIPE'} = 'IGNORE' if $Config{sig_name} =~ /\bPIPE\b/; # Truth is okay here because setting maxopen to 0 would be bad return $cacheout_maxopen = $args{maxopen} if $args{maxopen}; diff --git a/lib/FileCache/t/01open.t b/lib/FileCache/t/01open.t index d516aea..dfbb7b0 100644 --- a/lib/FileCache/t/01open.t +++ b/lib/FileCache/t/01open.t @@ -2,7 +2,7 @@ use FileCache; use vars qw(@files); BEGIN { - @files = qw(foo bar baz quux Foo'Bar); + @files = qw(foo bar baz quux Foo_Bar); chdir 't' if -d 't'; #For tests within the perl distribution diff --git a/lib/FileCache/t/03append.t b/lib/FileCache/t/03append.t index 5a08a1e..07edb7a 100644 --- a/lib/FileCache/t/03append.t +++ b/lib/FileCache/t/03append.t @@ -2,7 +2,7 @@ use FileCache maxopen=>2; use vars qw(@files); BEGIN { - @files = qw(foo bar baz quux Foo'Bar); + @files = qw(foo bar baz quux Foo_Bar); chdir 't' if -d 't'; #For tests within the perl distribution diff --git a/lib/FileCache/t/05override.t b/lib/FileCache/t/05override.t index 6fdf873..a807c25 100644 --- a/lib/FileCache/t/05override.t +++ b/lib/FileCache/t/05override.t @@ -8,12 +8,12 @@ BEGIN { END; } END{ - unlink("Foo'Bar"); + unlink("Foo_Bar"); } print "1..1\n"; {# Test 5: that close is overridden properly within the caller - cacheout local $_ = "Foo'Bar"; + cacheout local $_ = "Foo_Bar"; print $_ "Hello World\n"; close($_); print 'not ' if fileno($_);