summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/cperl-mode-resources/fontify-punctuation-vars.pl
blob: 6d3f478595e328b3b7f095a2cf3c0b2e261e7c4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# The following Perl punctuation variables contain characters which
# are classified as string delimiters in the syntax table.  The mode
# should not be confused by these.
# The corresponding tests check that two consecutive '#' characters
# are seen as comments, not as strings.
my $pre = $`;  ##  $PREMATCH,      use another ` # to balance out
my $pos = $';  ##  $POSTMATCH,     use another ' # to balance out
my $lsp = $";  ##  $LIST_SEPARATOR use another " # to balance out

# In the second level, we use the reference constructor \ on these
# variables.  The backslash is an escape character *only* in strings.
my $ref = \$`; ## \$PREMATCH,      use another ` # to balance out
my $rif = \$'; ## \$POSTMATCH,     use another ' # to balance out
my $raf = \$"; ## \$LIST_SEPARATOR use another " # to balance out

my $opt::s = 0;       ## s is no substitution here
my $opt_s  = 0;       ## s is no substitution here
my %opt = (s => 0);   ## s is no substitution here
$opt{s} = 0;          ## s is no substitution here
$opt_s =~ /\s+.../    ## s is no substitution here