state perl_pod extends Highlight
{
/\\\\./ {
language_print ($0);
}
/^=cut\s*$/ {
language_print ($0);
return;
}
}
state perl_comment extends Highlight
{
/\*\\\// {
language_print ($0);
return;
}
}
state perl_dquot_string extends Highlight
{
/\\\\./ {
language_print ($0);
}
/\"/ {
language_print ($0);
return;
}
}
state perl_quot_string extends Highlight
{
/\\\\./ {
language_print ($0);
}
/[\']/ {
language_print ($0);
return;
}
}
state perl_bquot_string extends Highlight
{
/\\\\./ {
language_print ($0);
}
/`/ {
language_print ($0);
return;
}
}
state perl extends HighlightEntry
{
/#.*$/ {
comment_face (true);
language_print ($0);
comment_face (false);
}
/\\\"/ {
language_print ($0);
}
/\\\'/ {
language_print ($0);
}
/\\\`/ {
language_print ($0);
}
/->\w+/ {
language_print ($0);
}
/-\w+=>/ {
language_print ($0);
}
/\/\// {
language_print ($0);
call (eat_one_line);
}
/\"/ {
string_face (true);
language_print ($0);
call (perl_dquot_string);
string_face (false);
}
/[\']/ {
string_face (true);
language_print ($0);
call (perl_quot_string);
string_face (false);
}
/`/ {
string_face (true);
language_print ($0);
call (perl_bquot_string);
string_face (false);
}
/[$%@&]+\w+/ {
keyword_face (false);
language_print ($0);
}
/\b(a(bs|ccept|larm|nd|tan2)|b(in(d|mode)|less)|c(aller|h(dir|mod\
|o(mp|p|wn)|r(|oot))|lose(|dir)|mp|o(n(nect|tinue)|s)|rypt)\
|d(bm(close|open)|e(fined|lete)|ie|o|ump)|e(ach|ls(e|if)|nd(gr|host|net|proto\
|pw|serv)ent|of|q|val|x(ec|i(sts|t)|p))|f(cntl|ileno|lock|or(|each|k\
|m(at|line)))|g(e(|t(c|gr(ent|gid|nam)|host(by(addr|name)|ent)|login\
|net(by(addr|name)|ent)|p(eername|grp|pid|riority|roto(by(addr|name|number)\
|ent)|w(ent|nam|uid))|s(erv(by(name|port)|ent)|ock(name|opt))))|lob|mtime\
|oto|rep|t)|hex|i(f|n(t|dex)|octl)|join|k(eys|ill)|l(ast|c(|first)|e(|ngth)\
|i(nk|sten)|o(cal(|time)|g)|stat|t)|m|m(ap|kdir|sg(ctl|get|rcv|snd)|y)\
|n(e(|w|xt)|o(|t))|o(ct|pen(|dir)|r(|d))|p(ack(|age)|ipe|o(p|s)|r(int(|f)\
|ototype)|ush)|q(|q|uotemeta|w|x)|r(and|e(a(d(|dir|lin(e|k)|pipe))|cv\
|do|f|name|quire|set|turn|verse|winddir)|index|mdir)|s(|calar|e(e(k|kdir)\
|lect|m(ctl|get|op)|nd|t((gr|host|net)ent|p(grp|r(iority|otoent)|went)\
|s(ervent|ockopt)))|h(ift|m(ctl|get|read|write)|utdown)|in|leep|o(cke(t|tpair)\
|rt)|p(li(ce|t)|rintf)|qrt|rand|t(at|udy)|u(b|bstr)|y(mlink|s(call|open|read\
|s(eek|tem)|write)))|t(ell(|dir)|i(e|ed|m(e|es))|r(|uncate))|u(c(|first)\
|mask|n(def|l(ess|ink)|pack|shift|ti(e|l))|se|time)|v(alues|ec)|w(a(i(t(|pid))\
|ntarray|rn)|hile|rite)|x(|or)|y)\b/ {
keyword_face (true);
language_print ($0);
keyword_face (false);
}
/^=(pod|head1|head2|item|over|back|for|begin|end)\b.*$/ {
language_print ($0);
call (perl_pod);
}
}