ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Guard/t/01_scoped.t
Revision: 1.3
Committed: Sat Dec 13 19:14:58 2008 UTC (15 years, 5 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_02, rel-1_0, rel-1_021, rel-1_023, rel-1_022, rel-0_5, rel-1_01, HEAD
Changes since 1.2: +2 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 BEGIN { $| = 1; print "1..10\n"; }
2    
3     use Guard;
4    
5     print "ok 1\n";
6    
7 root 1.3 our $global = 0;
8    
9 root 1.1 {
10 root 1.2 scope_guard {
11     print "ok 3\n"
12     };
13     local $global = 1;
14 root 1.1 print "ok 2\n";
15     }
16    
17     print "ok 4\n";
18    
19     {
20     scope_guard { print "ok 6\n" };
21     print "ok 5\n";
22     last;
23     }
24    
25     print "ok 7\n";
26    
27     {
28     scope_guard { print "ok 9\n" };
29     print "ok 8\n";
30     exit;
31     }
32    
33     END {
34     print "ok 10\n";
35     }