Alien-CodePress
view release on metacpan or search on metacpan
bin/codepress-install view on Meta::CPAN
=head1 NAME
codepress-install - CodePress installation.
=head1 SYNOPSIS
codepress-install [-q|-h|-m] [destination-dir]
Options:
--quiet | -h Install quietly (only report errors).
--help | -h This help screen.
destination-dir Directory to install into. (default current-directory).
=head1 DESCRIPTION
Installs CodePress using Alien::CodePress.
=head1 OPTIONS
=over 4
=item C<--quiet>
Install quietly (only report errors).
=item C<--help>
Show this help screen.
=item C<destination-dir>
Directory to install CodePress into. Default is the current directory.
=back
cp/codepress/languages/javascript.js view on Meta::CPAN
/*
* CodePress regular expressions for JavaScript syntax highlighting
*/
// JavaScript
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 : /\b(break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, output : '<b>$1</b>' }, // reserved words
{ input : /\b(alert|isNaN|parent|Array|parseFloat|parseInt|blur|clearTimeout|prompt|prototype|close|confirm|length|Date|location|Math|document|element|name|self|elements|setTimeout|navigator|status|String|escape|Number|submit|eval|Object|event|onblu...
{ input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
{ input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
]
Language.snippets = [
{ input : 'dw', output : 'document.write(\'$0\');' },
{ input : 'getid', output : 'document.getElementById(\'$0\')' },
{ input : 'fun', output : 'function $0(){\n\t\n}' },
{ input : 'func', output : 'function $0(){\n\t\n}' }
]
inc/Module/Build/Alien/CodePress.pm view on Meta::CPAN
$self->install_codepress();
return;
}
sub fetch_codepress {
my ($self) = @_;
return if -f Alien::CodePress::Archive->filename();
eval 'require File::Fetch'; ## no critic
if ($EVAL_ERROR) {
$self->log_error('This feature requires File::Fetch', "\n");
return;
}
my $codepress_url = Alien::CodePress::Archive->url();
$self->log_info('Downloading CodePress...', "\n");
my $path = File::Fetch->new(
uri => $codepress_url,
)->fetch();
if (not $path) {
( run in 0.688 second using v1.01-cache-2.11-cpan-65fba6d93b7 )