Class-Dot
view release on metacpan or search on metacpan
contrib/vim/syntax/perl.vim view on Meta::CPAN
" Should be cleaned up to better handle identifiers in particular situations
" (in hash keys for example)
"
" Plain identifiers: $foo, @foo, $#foo, %foo, &foo and dereferences $$foo, @$foo, etc.
" We do not process complex things such as @{${"foo"}}. Too complicated, and
" too slow. And what is after the -> is *not* considered as part of the
" variable - there again, too complicated and too slow.
" Special variables first ($^A, ...) and ($|, $', ...)
syn match perlVarPlain "$^[ADEFHILMOPSTWX]\="
syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]"
syn match perlVarPlain "$\(0\|[1-9][0-9]*\)"
" Same as above, but avoids confusion in $::foo (equivalent to $main::foo)
syn match perlVarPlain "$:[^:]"
" These variables are not recognized within matches.
syn match perlVarNotInMatches "$[|)]"
" This variable is not recognized within matches delimited by m//.
syn match perlVarSlash "$/"
" And plain identifiers
syn match perlPackageRef "\(\h\w*\)\=\(::\|'\)\I"me=e-1 contained
" To highlight packages in variables as a scope reference - i.e. in $pack::var,
" pack:: is a scope, just set "perl_want_scope_in_variables"
" If you *want* complex things like @{${"foo"}} to be processed,
" just set the variable "perl_extended_vars"...
( run in 0.811 second using v1.01-cache-2.11-cpan-cc502c75498 )