diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-04-29 22:41:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-04-29 22:41:36 +0000 |
commit | 729aafbcb9fde84a3066c8a390be5eb1ab5d8f18 (patch) | |
tree | 09c78277baa3ffe4b5c171394dbe476540cadd5f /gnu/usr.bin/perl | |
parent | 3c20254a11bf0e7ccf2d5ee4808e6a0489a6e35c (diff) |
perl5.005_03
Diffstat (limited to 'gnu/usr.bin/perl')
-rw-r--r-- | gnu/usr.bin/perl/t/lib/h2ph.pht | 60 |
1 files changed, 18 insertions, 42 deletions
diff --git a/gnu/usr.bin/perl/t/lib/h2ph.pht b/gnu/usr.bin/perl/t/lib/h2ph.pht index cda8d21051c..e5b293243ec 100644 --- a/gnu/usr.bin/perl/t/lib/h2ph.pht +++ b/gnu/usr.bin/perl/t/lib/h2ph.pht @@ -1,16 +1,14 @@ require '_h2ph_pre.ph'; -no warnings qw(redefine misc); - unless(defined(&SQUARE)) { sub SQUARE { - my($x) = @_; + local($x) = @_; eval q((($x)*($x))); } } unless(defined(&ERROR)) { eval 'sub ERROR { - my($x) = @_; + local($x) = @_; eval q( &fprintf( &stderr, \\"%s\\\\n\\", $x->[2][3][0])); }' unless defined(&ERROR); } @@ -19,47 +17,42 @@ unless(defined(&_H2PH_H_)) { # "$Revision h2ph.h,v 1.0 98/05/04 20:42:14 billy $" undef(&MAX) if defined(&MAX); eval 'sub MAX { - my($a,$b) = @_; + local($a,$b) = @_; eval q((($a) > ($b) ? ($a) : ($b))); }' unless defined(&MAX); - eval 'sub NOTTRUE () {0;}' unless defined(&NOTTRUE); - undef(&NOTTRUE) if defined(&NOTTRUE); if(defined(&__SOME_UNIMPORTANT_PROPERTY)) { eval 'sub MIN { - my($a,$b) = @_; + local($a,$b) = @_; eval q((($a) < ($b) ? ($a) : ($b))); }' unless defined(&MIN); } - if(!(defined (&__SOMETHING_MORE_IMPORTANT))) { + if(!(defined (defined(&__SOMETHING_MORE_IMPORTANT) ? &__SOMETHING_MORE_IMPORTANT : 0))) { } - elsif(!(defined (&__SOMETHING_REALLY_REALLY_IMPORTANT))) { - die("Nup, can't go on"); + elsif(!(defined (defined(&__SOMETHING_REALLY_REALLY_IMPORTANT) ? &__SOMETHING_REALLY_REALLY_IMPORTANT : 0))) { + die("Nup\,\ can\'t\ go\ on\ "); } else { eval 'sub EVERYTHING_IS_OK () {1;}' unless defined(&EVERYTHING_IS_OK); } undef(&WHATEVER) if defined(&WHATEVER); - if((!((defined (&__SOMETHING_TRIVIAL) && defined (&__SOMETHING_LESS_SO))) || defined (&__SOMETHING_OVERPOWERING))) { + if((!((defined (defined(&__SOMETHING_TRIVIAL) ? &__SOMETHING_TRIVIAL : 0) && defined (defined(&__SOMETHING_LESS_SO) ? &__SOMETHING_LESS_SO : 0))) || defined (defined(&__SOMETHING_OVERPOWERING) ? &__SOMETHING_OVERPOWERING : 0))) { eval 'sub WHATEVER () {6;}' unless defined(&WHATEVER); } - elsif(!(defined (&__SOMETHING_TRIVIAL)) ) { + elsif(!(defined (defined(&__SOMETHING_TRIVIAL) ? &__SOMETHING_TRIVIAL : 0)) ) { eval 'sub WHATEVER () {7;}' unless defined(&WHATEVER); } - elsif(!(defined (&__SOMETHING_LESS_SO)) ) { + elsif(!(defined (defined(&__SOMETHING_LESS_SO) ? &__SOMETHING_LESS_SO : 0)) ) { eval 'sub WHATEVER () {8;}' unless defined(&WHATEVER); } else { eval 'sub WHATEVER () {1000;}' unless defined(&WHATEVER); } - if(0) { - require 'sys/socket.ph'; - require 'sys/ioctl.ph'; - eval { - my(@REM); - my(%INCD) = map { $INC{$_} => 1 } (grep { $_ eq "sys/fcntl.ph" } keys(%INC)); - @REM = map { "$_/sys/fcntl.ph" } (grep { not exists($INCD{"$_/sys/fcntl.ph"}) and -f "$_/sys/fcntl.ph" } @INC); - require "$REM[0]" if @REM; - }; - warn($@) if $@; - } + require 'sys/socket.ph'; + require 'sys/ioctl.ph'; + eval { + my(%INCD) = map { $INC{$_} => 1 } (grep { $_ eq "sys/fcntl.ph" } keys(%INC)); + my(@REM) = map { "$_/sys/fcntl.ph" } (grep { not exists($INCD{"$_/sys/fcntl.ph"})and -f "$_/sys/fcntl.ph" } @INC); + require "$REM[0]" if @REM; + }; + warn($@) if $@; eval("sub sun () { 0; }") unless defined(&sun); eval("sub mon () { 1; }") unless defined(&mon); eval("sub tue () { 2; }") unless defined(&tue); @@ -74,22 +67,5 @@ unless(defined(&_H2PH_H_)) { eval("sub Thu () { 4; }") unless defined(&Thu); eval("sub Fri () { 5; }") unless defined(&Fri); eval("sub Sat () { 6; }") unless defined(&Sat); - unless(defined(&_SOMETHING_TRIGRAPHIC)) { - eval 'sub _SOMETHING_TRIGRAPHIC () {1;}' unless defined(&_SOMETHING_TRIGRAPHIC); - eval 'sub SOMETHING_ELSE_TRIGRAPHIC_0 () {"|";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_0); - eval 'sub SOMETHING_ELSE_TRIGRAPHIC_1 () {"^";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_1); - eval 'sub SOMETHING_ELSE_TRIGRAPHIC_2 () {"[";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_2); - eval 'sub SOMETHING_ELSE_TRIGRAPHIC_3 () {"]";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_3); - eval 'sub SOMETHING_ELSE_TRIGRAPHIC_4 () {"~0";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_4); - eval 'sub SOMETHING_ELSE_TRIGRAPHIC_5 () {"\\ ";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_5); - eval 'sub SOMETHING_ELSE_TRIGRAPHIC_6 () {"{";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_6); - eval 'sub SOMETHING_ELSE_TRIGRAPHIC_7 () {"#";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_7); - eval 'sub SOMETHING_ELSE_TRIGRAPHIC_8 () {"}";}' unless defined(&SOMETHING_ELSE_TRIGRAPHIC_8); - } - if(1) { - } - eval("sub flim () { 0; }") unless defined(&flim); - eval("sub flam () { 1; }") unless defined(&flam); - eval 'sub multiline () {"multilinestring";}' unless defined(&multiline); } 1; |