Alien-CodePress
view release on metacpan or search on metacpan
cp/codepress/languages/perl.js view on Meta::CPAN
* CodePress regular expressions for Perl syntax highlighting
* By J. Nick Koston
*/
// Perl
Language.syntax = [
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
{ input : /([\$\@\%][\w\.]*)/g, output : '<a>$1</a>' }, // vars
{ input : /(sub\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
{ input : /\b(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|connect|continue|cos|crypt|dbmclose|dbmopen|defined|delete|die|do|dump|each|else|elsif|endgrent|endhostent|endnetent|endprotoent|e...
{ input : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
{ input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
]
Language.snippets = []
Language.complete = [
{ input : '\'',output : '\'$0\'' },
{ input : '"', output : '"$0"' },
{ input : '(', output : '\($0\)' },
lib/Alien/CodePress.pm view on Meta::CPAN
);
__PACKAGE__->make_accessors(@PROPERTIES);
sub new {
my ($class, $options_ref) = @_;
my $self = { };
bless $self, $class;
$self->init_properties();
$self->set_properties($options_ref);
return $self;
}
sub version {
return Alien::CodePress::Archive->version;
}
( run in 0.417 second using v1.01-cache-2.11-cpan-de7293f3b23 )