2 /*************************************************************************************
5 * Author: Andreas Gohr (andi@splitbrain.org), Ben Keen (ben.keen@gmail.com)
6 * Copyright: (c) 2004 Andreas Gohr, Ben Keen (http://www.benjaminkeen.org/), Nigel McNie (http://qbnz.com/highlighter/)
7 * Release Version: 1.0.7.6
8 * CVS Revision Version: $Revision: 1.7 $
9 * Date Started: 2004/08/20
10 * Last Modified: $Date: 2006/01/05 07:20:16 $
12 * Perl language file for GeSHi.
17 * - Used hardescape feature for ' strings (Cliff Stanford)
19 * - Added support for multiple object splitters
23 * TODO (updated 2004/11/27)
24 * -------------------------
26 * * string comparison operators
28 *************************************************************************************
30 * This file is part of GeSHi.
32 * GeSHi is free software; you can redistribute it and/or modify
33 * it under the terms of the GNU General Public License as published by
34 * the Free Software Foundation; either version 2 of the License, or
35 * (at your option) any later version.
37 * GeSHi is distributed in the hope that it will be useful,
38 * but WITHOUT ANY WARRANTY; without even the implied warranty of
39 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 * GNU General Public License for more details.
42 * You should have received a copy of the GNU General Public License
43 * along with GeSHi; if not, write to the Free Software
44 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
46 ************************************************************************************/
48 $language_data = array (
49 'LANG_NAME' => 'Perl',
50 'COMMENT_SINGLE' => array(1 => '#'),
51 'COMMENT_MULTI' => array( '=pod' => '=cut'),
52 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
53 'QUOTEMARKS' => array('"'),
54 'HARDQUOTE' => array("'", "'"), // An optional 2-element array defining the beginning and end of a hard-quoted string
55 'HARDESCAPE' => array('\\\'', "\\\\"), // Things that must still be escaped inside a hard-quoted string
56 // If HARDQUOTE is defined, HARDESCAPE must be defined
57 // This will not work unless the first character of each element is either in the
58 // QUOTEMARKS array or is the ESCAPE_CHAR
59 'ESCAPE_CHAR' => '\\',
62 'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my',
63 'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our',
64 'reset', 'continue','and', 'cmp', 'ne'
67 'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN',
68 'STDIN', 'STDOUT', 'STDERR'
71 'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless',
72 'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr',
73 'chroot', 'close', 'closedir', 'connect', 'continue', 'cos',
74 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die',
75 'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent',
76 'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit',
77 'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline',
78 'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr',
79 'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname',
80 'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority',
81 'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent',
82 'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent',
83 'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep',
84 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill',
85 'last', 'lc', 'lcfirst', 'length', 'link', 'listen', 'local',
86 'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget',
87 'msgrcv', 'msgsnd', 'my', 'next', 'no', 'oct', 'open', 'opendir',
88 'ord', 'our', 'pack', 'package', 'pipe', 'pop', 'pos', 'print',
89 'printf', 'prototype', 'push', 'qq', 'qr', 'quotemeta', 'qw',
90 'qx', 'q', 'rand', 'read', 'readdir', 'readline', 'readlink', 'readpipe',
91 'recv', 'redo', 'ref', 'rename', 'require', 'return',
92 'reverse', 'rewinddir', 'rindex', 'rmdir', 's', 'scalar', 'seek',
93 'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent',
94 'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent',
95 'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget',
96 'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair',
97 'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat',
98 'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread',
99 'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied',
100 'time', 'times', 'tr', 'truncate', 'uc', 'ucfirst', 'umask', 'undef',
101 'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values',
102 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y'
106 '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>'
108 'CASE_SENSITIVE' => array(
109 GESHI_COMMENTS
=> true
,
116 1 => 'color: #b1b100;',
117 2 => 'color: #000000; font-weight: bold;',
118 3 => 'color: #000066;'
121 1 => 'color: #808080; font-style: italic;',
122 'MULTI' => 'color: #808080; font-style: italic;'
124 'ESCAPE_CHAR' => array(
125 0 => 'color: #000099; font-weight: bold;'
128 0 => 'color: #66cc66;'
131 0 => 'color: #ff0000;'
134 0 => 'color: #cc66cc;'
137 1 => 'color: #006600;',
138 2 => 'color: #006600;'
141 0 => 'color: #66cc66;'
144 0 => 'color: #0000ff;',
145 4 => 'color: #009999;',
151 3 => 'http://www.perldoc.com/perl5.6/pod/func/{FNAME}.html'
154 'OBJECT_SPLITTERS' => array(
159 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*',
160 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>',
162 'STRICT_MODE_APPLIES' => GESHI_NEVER
,
163 'SCRIPT_DELIMITERS' => array(
165 'HIGHLIGHT_STRICT_BLOCK' => array(