summaryrefslogtreecommitdiff
path: root/ext/re/t/lexical_debug.pl
blob: 0e74bf02582f8099fcf98a8fef694a1232fab336 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use re 'debug';

$_ = 'foo bar baz bop boq bor fip fop';

/foo/ and $count++;

{
    no re 'debug';
    /bar/ and $count++;
    {
        use re 'debug';
        /baz/ and $count++;
    }
    /bop/ and $count++;
}

{
    use re 'debug';
    /boq/ and $count++;
    no re;
    /bor/ and $count++;
}

/fip/ and $count++;

no re 'debug';

/fop/ and $count++;

use re 'debug';
my $var='zoo|liz|zap';
/($var)/ or $count++;

print "Count=$count\n";