This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
in Carp, avoid vivifying utf8 stash on Perl 5.6
[perl5.git] / t / comp / decl.t
index af8bf05..414b3cd 100644 (file)
@@ -1,20 +1,18 @@
 #!./perl
 
-# $Header: decl.t,v 4.0 91/03/20 01:50:09 lwall Locked $
-
-# check to see if subroutine declarations work everwhere
+# check to see if subroutine declarations work everywhere
 
 sub one {
     print "ok 1\n";
 }
 format one =
-ok 5
+ok 6
 .
 
-print "1..7\n";
+print "1..9\n";
 
-do one();
-do two();
+one();
+two();
 
 sub two {
     print "ok 2\n";
@@ -28,22 +26,36 @@ if ($x eq $x) {
     sub three {
        print "ok 3\n";
     }
-    do three();
+    three();
 }
 
-do four();
+four();
+five();
 $~ = 'one';
 write;
 $~ = 'two';
-$foo = "ok 6";
+$foo = "ok 7";
 write;
 $~ = 'three';
 write;
 
 format three =
-ok 7
+ok 8
 .
 
+if ($x eq $x) {
+    goto quux;
+}
+
+print "not ok 9\n";
+exit 1;
+
 sub four {
     print "ok 4\n";
 }
+
+quux:
+sub five {
+    print "ok 5\n";
+}
+print "ok 9\n";