]> code.delx.au - gnu-emacs/blob - test/indent/perl.perl
Uncomment the next-error-function integration in xref
[gnu-emacs] / test / indent / perl.perl
1 #!/usr/bin/perl
2 # -*- eval: (bug-reference-mode 1) -*-
3
4 sub add_funds($) {
5 return 0;
6 }
7
8 my $hash = {
9 foo => 'bar',
10 format => 'some',
11 };
12
13 sub some_code {
14 print "will not indent :(";
15 };
16
17 use v5.14;
18
19 my $str= <<END;
20 Hello
21 END
22
23 my $a = $';
24
25 my $b=3;
26
27 print $str;
28 if ($c && /====/){xyz;}
29
30 print "a" . <<EOF . s/he"llo/th'ere/;
31 It's a surprise!
32 EOF
33
34 print <<\EOF1 . s/he"llo/th'ere/;
35 foo
36 EOF2
37 bar
38 EOF1
39
40 $config = {
41 b =>
42 [
43 "123",
44 ],
45 c => "123",
46 };
47
48 print <<"EOF1" . <<\EOF2 . s/he"llo/th'ere/;
49 foo
50 EOF2
51 bar
52 EOF1
53 bar
54 EOF2
55
56 print $'; # This should not start a string!
57
58 print "hello" for /./;
59
60 $fileType_filesButNot # bug#12373?
61 = join( '|', map { quotemeta($_).'$' } @{$fileType->{filesButNot}} );
62
63 # There can be a comment between an if/when/while and a /<re>/ matcher!
64 return 'W' if #/^Not Available on Mobile/m; #W=Web only
65 /This video is not available on mobile devices./m; #bug#20800
66
67 # A "y|abc|def|" shouldn't interfere when inside a string!
68 $toto = " x \" string\"";
69 $toto = " y \" string\""; # This is not the `y' operator!