view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Decode/Mojo.pm view on Meta::CPAN
my @list = map {
my $url = URI->new_abs($_, $base);
my $path = $url->path;
$path =~ s{/$}{}; # work around for Perl 5.8.7- gh#8
{
filename => URI::Escape::uri_unescape(File::Basename::basename($path)),
url => URI::Escape::uri_unescape($url->as_string),
}
}
grep !/^\.\.?\/?$/,
map { $_->attr('href') || () }
@{ $dom->find('a')->to_array };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Download/GitLab.pm view on Meta::CPAN
use warnings;
use 5.008004;
use Carp qw( croak );
use URI;
use JSON::PP qw( decode_json );
use URI::Escape qw( uri_escape );
use Alien::Build::Plugin;
use File::Basename qw( basename );
use Path::Tiny qw( path );
# ABSTRACT: Alien::Build plugin to download from GitLab
lib/Alien/Build/Plugin/Download/GitLab.pm view on Meta::CPAN
croak("Don't set set a start_url with the Download::GitLab plugin") if defined $meta->prop->{start_url};
$meta->add_requires('configure' => 'Alien::Build::Plugin::Download::GitLab' => 0 );
my $url = URI->new($self->gitlab_host);
$url->path("/api/v4/projects/@{[ uri_escape(join '/', $self->gitlab_user, $self->gitlab_project) ]}/releases");
$meta->prop->{start_url} ||= "$url";
$meta->apply_plugin('Download');
$meta->apply_plugin('Extract', format => $self->format );
view all matches for this distribution
view release on metacpan or search on metacpan
cp/codepress/languages/javascript.js view on Meta::CPAN
// 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 = [
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBD/SQLite/BundledExtensions.pm view on Meta::CPAN
IMPLEMENTATION NOTES:
The next_char function is implemented using recursive SQL that makes
use of the table name and column name as part of a query. If either
the table name or column name are keywords or contain special characters,
then they should be escaped. For example:
SELECT next_char('cha','[dictionary]','[word]');
This also means that the table name can be a subquery:
view all matches for this distribution
view release on metacpan or search on metacpan
src/Source/FreeImage/PluginRAS.cpp view on Meta::CPAN
// (red, green, then blue) that are each 1/3 of the colormap length.
#define RMT_NONE 0 // maplength is expected to be 0
#define RMT_EQUAL_RGB 1 // red[maplength/3], green[maplength/3], blue[maplength/3]
#define RMT_RAW 2 // Raw colormap
#define RESC 128 // Run-length encoding escape character
// ----- NOTES -----
// Each line of the image is rounded out to a multiple of 16 bits.
// This corresponds to the rounding convention used by the memory pixrect
// package (/usr/include/pixrect/memvar.h) of the SunWindows system.
view all matches for this distribution
view release on metacpan or search on metacpan
test/functional/examples.pl view on Meta::CPAN
my $daemon = HTTP::Daemon->new(LocalPort => $port) || die;
print "Please contact me at: <URL:", $daemon->url, ">\n";
while (my $client_connection = $daemon->accept) {
while (my $req = $client_connection->get_request) {
my $path_info = decode_utf8(substr(uri_unescape($req->url->path), 1));
print STDERR "REQUEST: $path_info\n";
$client_connection->force_last_request;
view all matches for this distribution
view release on metacpan or search on metacpan
src/judy-1.0.5/aclocal.m4 view on Meta::CPAN
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
# Same as above, but do not quote variable references.
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
# Sed substitution to delay expansion of an escaped shell variable in a
# double_quote_subst'ed string.
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
# Sed substitution to avoid accidental globbing in evaled expressions
no_glob_subst='s/\*/\\\*/g'
src/judy-1.0.5/aclocal.m4 view on Meta::CPAN
# libtool distribution, otherwise you forgot to ship ltmain.sh
# with your package, and you will get complaints that there are
# no rules to generate ltmain.sh.
if test -f "$ltmain"; then
# See if we are running on zsh, and set the options which allow our commands through
# without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
view all matches for this distribution
view release on metacpan or search on metacpan
libjit/tools/gen-ops-scanner.l view on Meta::CPAN
static char *genops_read_literal()
{
char *buf = 0;
int buflen = 0;
int bufmax = 0;
int escape = 0;
int ch;
for(;;)
{
ch = input();
if(ch == EOF)
libjit/tools/gen-ops-scanner.l view on Meta::CPAN
if(ch == '\n')
{
fprintf(stderr, "Unexpected newline in string literal\n");
exit(1);
}
if(escape)
{
escape = 0;
if(ch == 'n')
{
ch = '\n';
}
else if(ch == 't')
libjit/tools/gen-ops-scanner.l view on Meta::CPAN
}
else
{
if(ch == '\\')
{
escape = 1;
continue;
}
if(ch == '"')
{
break;
view all matches for this distribution
view release on metacpan or search on metacpan
.claude/skills/getty-perl-core/SKILL.md view on Meta::CPAN
- **Name the origin in the message:** `croak __PACKAGE__."->state too many args"` â or whatever identifies the operation in that module's DSL.
## Strings
- **Concatenate, do not interpolate:** `'Adding '.$f.' with '.$length.' bytes'`. Interpolate only where concatenation would be unreadable.
- **Single quotes by default.** `'...'` and `"..."` are genuinely different in Perl â `"` interpolates and processes escapes, `'` does not. Reach for `"` when you need that, not by habit.
- **Import lists as `qw( croak confess )`** â spaces inside the parens. Never rely on default exports.
## Control flow
- **Postfix `if`/`unless`** for guards and short conditions: `croak(...) if $self->readonly;`
view all matches for this distribution
view release on metacpan or search on metacpan
prototype.js view on Meta::CPAN
}
};
RegExp.prototype.match = RegExp.prototype.test;
RegExp.escape = function(str) {
return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
};
/*--------------------------------------------------------------------------*/
prototype.js view on Meta::CPAN
evalScripts: function() {
return this.extractScripts().map(function(script) { return eval(script) });
},
escapeHTML: function() {
var self = arguments.callee;
self.text.data = this;
return self.div.innerHTML;
},
unescapeHTML: function() {
var div = new Element('div');
div.innerHTML = this.stripTags();
return div.childNodes[0] ? (div.childNodes.length > 1 ?
$A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
div.childNodes[0].nodeValue) : '';
prototype.js view on Meta::CPAN
dasherize: function() {
return this.gsub(/_/,'-');
},
inspect: function(useDoubleQuotes) {
var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
var character = String.specialChar[match[0]];
return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
});
if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
return "'" + escapedString.replace(/'/g, '\\\'') + "'";
},
toJSON: function() {
return this.inspect(true);
},
prototype.js view on Meta::CPAN
return new Template(this, pattern).evaluate(object);
}
});
if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
escapeHTML: function() {
return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
},
unescapeHTML: function() {
return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
}
});
String.prototype.gsub.prepareReplacement = function(replacement) {
prototype.js view on Meta::CPAN
return function(match) { return template.evaluate(match) };
};
String.prototype.parseQuery = String.prototype.toQueryParams;
Object.extend(String.prototype.escapeHTML, {
div: document.createElement('div'),
text: document.createTextNode('')
});
with (String.prototype.escapeHTML) div.appendChild(text);
var Template = Class.create({
initialize: function(template, pattern) {
this.template = template.toString();
this.pattern = pattern || Template.Pattern;
prototype.js view on Meta::CPAN
},
_getHeaderJSON: function() {
var json = this.getHeader('X-JSON');
if (!json) return null;
json = decodeURIComponent(escape(json));
try {
return json.evalJSON(this.request.options.sanitizeJSON);
} catch (e) {
this.request.dispatchException(e);
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
return $file;
}
### XXX do this or just point to URI::Escape?
# =head2 $esc_uri = $ff->escaped_uri
#
# =cut
#
# ### most of this is stolen straight from URI::escape
# { ### Build a char->hex map
# my %escapes = map { chr($_) => sprintf("%%%02X", $_) } 0..255;
#
# sub escaped_uri {
# my $self = shift;
# my $uri = $self->uri;
#
# ### Default unsafe characters. RFC 2732 ^(uric - reserved)
# $uri =~ s/([^A-Za-z0-9\-_.!~*'()])/
# $escapes{$1} || $self->_fail_hi($1)/ge;
#
# return $uri;
# }
#
# sub _fail_hi {
# my $self = shift;
# my $char = shift;
#
# $self->_error(loc(
# "Can't escape '%1', try using the '%2' module instead",
# sprintf("\\x{%04X}", ord($char)), 'URI::Escape'
# ));
# }
#
# sub output_file {
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
C<File::Fetch> is relatively smart about things. When trying to write
a file to disk, it removes the C<query parameters> (see the
C<output_file> method for details) from the file name before creating
it. In most cases this suffices.
If you have any other characters you need to escape, please install
the C<URI::Escape> module from CPAN, and pre-encode your URI before
passing it to C<File::Fetch>. You can read about the details of URIs
and URI encoding here:
http://www.faqs.org/rfcs/rfc2396.html
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/autoheck-libpalindrome/configure view on Meta::CPAN
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
# Same as above, but do not quote variable references.
double_quote_subst='s/\(["`\\]\)/\\\1/g'
# Sed substitution to delay expansion of an escaped shell variable in a
# double_quote_subst'ed string.
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
# Sed substitution to delay expansion of an escaped single quote.
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
# Sed substitution to avoid accidental globbing in evaled expressions
no_glob_subst='s/\*/\\\*/g'
corpus/autoheck-libpalindrome/configure view on Meta::CPAN
done
ac_aux_dir='$ac_aux_dir'
# See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes INIT.
if test -n "\${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
corpus/autoheck-libpalindrome/configure view on Meta::CPAN
}
;;
"libtool":C)
# See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
cfgfile=${ofile}T
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
$cfg->{ld_shared_libs} = [ ];
# overwrite values available via sdl-config
my $bp = $self->config_data('build_prefix') || $prefix;
my $devnull = File::Spec->devnull();
my $script = $self->escape_path( rel2abs("$prefix/bin/sdl-config") );
foreach my $p (qw(version prefix libs cflags)) {
my $o=`$script --$p 2>$devnull`;
if ($o) {
$o =~ s/[\r\n]*$//;
$o =~ s/\Q$prefix\E/\@PrEfIx\@/g;
inc/My/Builder.pm view on Meta::CPAN
remove_tree($dir);
make_path($dir);
}
}
sub escape_path {
# this needs to be overriden in My::Builder::<platform>
my( $self, $path ) = @_;
return $path;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
$cfg->{ld_shared_libs} = [ ];
# overwrite values available via sdl2-config
my $bp = $self->config_data('build_prefix') || $prefix;
my $devnull = File::Spec->devnull();
my $script = $self->escape_path( rel2abs("$prefix/bin/sdl2-config") );
foreach my $p (qw(version prefix libs cflags)) {
my $o=`$script --$p 2>$devnull`;
if ($o) {
$o =~ s/[\r\n]*$//;
$o =~ s/\Q$prefix\E/\@PrEfIx\@/g;
inc/My/Builder.pm view on Meta::CPAN
remove_tree($dir);
make_path($dir);
}
}
sub escape_path {
# this needs to be overriden in My::Builder::<platform>
my( $self, $path ) = @_;
return $path;
}
view all matches for this distribution
view release on metacpan or search on metacpan
src/subversion/tools/dist/backport.pl view on Meta::CPAN
my ($mergeargs, $pattern);
my $backupfile = "backport_pl.$$.tmp";
if ($entry{branch}) {
# NOTE: This doesn't escape the branch into the pattern.
$pattern = sprintf '\V\(%s branch(es)?\|branches\/%s\|Branch(es)?:\n *%s\)', $entry{branch}, $entry{branch}, $entry{branch};
$mergeargs = "--reintegrate $BRANCHES/$entry{branch}";
print $logmsg_fh "Reintegrate the $entry{header}:";
print $logmsg_fh "";
} elsif (@{$entry{revisions}}) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Locale/Maketext/Simple.pm view on Meta::CPAN
elsif ($style eq 'gettext') {
$Loc{$pkg} = sub {
my $str = shift;
$str =~ s/[\~\[\]]/~$&/g;
$str =~ s{(^|[^%\\])%([A-Za-z#*]\w*)\(([^\)]*)\)}
{"$1\[$2,"._unescape($3)."]"}eg;
$str =~ s/(^|[^%\\])%(\d+|\*)/$1\[_$2]/g;
return $lh->maketext($str, @_);
};
}
else {
inc/Locale/Maketext/Simple.pm view on Meta::CPAN
if ($style eq 'maketext') {
return sub {
my $str = shift;
$str =~ s/((?<!~)(?:~~)*)\[_(\d+)\]/$1%$2/g;
$str =~ s{((?<!~)(?:~~)*)\[([A-Za-z#*]\w*),([^\]]+)\]}
{"$1%$2("._escape($3).")"}eg;
$str =~ s/~([\[\]])/$1/g;
_default_gettext($str, @_);
};
}
elsif ($style eq 'gettext') {
inc/Locale/Maketext/Simple.pm view on Meta::CPAN
);
}egx;
return $str;
};
sub _escape {
my $text = shift;
$text =~ s/\b_(\d+)/%$1/;
return $text;
}
sub _unescape {
my $str = shift;
$str =~ s/(^|,)%(\d+|\*)(,|$)/$1_$2$3/g;
return $str;
}
view all matches for this distribution
view release on metacpan or search on metacpan
generator/parser/stringhelpers.cpp view on Meta::CPAN
}
return ret;
}
///@todo this hackery sucks
QString escapeForBracketMatching(QString str) {
str.replace("<<", "$&");
str.replace(">>", "$$");
str.replace("\\\"", "$!");
str.replace("->", "$?");
return str;
}
QString escapeFromBracketMatching(QString str) {
str.replace("$&", "<<");
str.replace("$$", ">>");
str.replace("$!", "\\\"");
str.replace("$?", "->");
return str;
}
void skipFunctionArguments(QString str, QStringList& skippedArguments, int& argumentsStart ) {
QString withStrings = escapeForBracketMatching(str);
str = escapeForBracketMatching(clearStrings(str));
//Blank out everything that can confuse the bracket-matching algorithm
QString reversed = reverse( str.left(argumentsStart) );
QString withStringsReversed = reverse( withStrings.left(argumentsStart) );
//Now we should decrease argumentStart at the end by the count of steps we go right until we find the beginning of the function
generator/parser/stringhelpers.cpp view on Meta::CPAN
int lastPos = pos;
pos = findCommaOrEnd( reversed, pos ) ;
if( pos > lastPos ) {
QString arg = reverse( withStringsReversed.mid(lastPos, pos-lastPos) ).trimmed();
if( !arg.isEmpty() )
skippedArguments.push_front( escapeFromBracketMatching(arg) ); //We are processing the reversed reverseding, so push to front
}
if( reversed[pos] == ')' || reversed[pos] == '>' )
break;
else
++pos;
view all matches for this distribution
view release on metacpan or search on metacpan
share/swagger-ui-bundle.js view on Meta::CPAN
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(f...
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function()...
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
share/swagger-ui-bundle.js view on Meta::CPAN
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)r...
/**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
share/swagger-ui-bundle.js view on Meta::CPAN
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=docum...
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* (c) 2017 Joachim Wester
* MIT license
*/
var n=this&&this.__extends||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},r=Object.prototype.hasOwnProperty;function o(e,t){return ...
/** @license React v16.8.6
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):6010...
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* (c) 2017 Joachim Wester
* MIT license
*/
var r=n(267),o=n(456),i=n(456);t.applyOperation=i.applyOperation,t.applyPatch=i.applyPatch,t.applyReducer=i.applyReducer,t.getValueByPointer=i.getValueByPointer,t.validate=i.validate,t.validator=i.validator;var a=n(267);t.JsonPatchError=a.PatchError,...
/*!
* @description Recursive object extending
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
* @license MIT
*
share/swagger-ui-bundle.js view on Meta::CPAN
/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/var r,o="";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,o="";else if(o.length>=n)return o.substr(0,n);for(;n>o.length&&t>1;)1...
/*!
* Autolinker.js
* 0.28.1
*
* Copyright(c) 2016 Gregory Jacobs <greg@greg-jacobs.com>
* MIT License
*
* https://github.com/gregjacobs/Autolinker.js
*/o=[],void 0===(i="function"==typeof(r=function(){var e,t,n,r,o,i,a,s=function(e){e=e||{},this.version=s.version,this.urls=this.normalizeUrlsCfg(e.urls),this.email="boolean"!=typeof e.email||e.email,this.twitter="boolean"!=typeof e.twitter||e.twitt...
//# sourceMappingURL=swagger-ui-bundle.js.map
view all matches for this distribution
view release on metacpan or search on metacpan
src/texi2pod.pl view on Meta::CPAN
s/\@TeX\{\}/TeX/g;
s/\@pounds\{\}/\#/g;
s/\@minus(?:\{\})?/-/g;
s/\\,/,/g;
# Now the ones that have to be replaced by special escapes
# (which will be turned back into text by unmunge())
s/&/&/g;
s/\@\{/{/g;
s/\@\}/}/g;
s/\@\@/&at;/g;
src/texi2pod.pl view on Meta::CPAN
$_ = ""; # need a paragraph break
};
/^\@itemx?\s*(.+)?$/ and do {
if (defined $1) {
# Entity escapes prevent munging by the <> processing below.
$_ = "\n=item $ic\<$1\>\n";
} else {
$_ = "\n=item $ic\n";
$ic =~ y/A-Ya-y/B-Zb-z/;
$ic =~ s/(\d+)/$1 + 1/eg;
src/texi2pod.pl view on Meta::CPAN
s/\Q$1\E/$value/;
}
}
# Formatting commands.
# Temporary escape for @r.
s/\@r\{([^\}]*)\}/R<$1>/g;
s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g;
s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g;
s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g;
s/\@sc\{([^\}]*)\}/\U$1/g;
src/texi2pod.pl view on Meta::CPAN
return $_;
}
sub unmunge
{
# Replace escaped symbols with their equivalents.
local $_ = $_[0];
s/</E<lt>/g;
s/>/E<gt>/g;
s/{/\{/g;
view all matches for this distribution
view release on metacpan or search on metacpan
src/texi2pod.pl view on Meta::CPAN
s/\@TeX\{\}/TeX/g;
s/\@pounds\{\}/\#/g;
s/\@minus(?:\{\})?/-/g;
s/\\,/,/g;
# Now the ones that have to be replaced by special escapes
# (which will be turned back into text by unmunge())
s/&/&/g;
s/\@\{/{/g;
s/\@\}/}/g;
s/\@\@/&at;/g;
src/texi2pod.pl view on Meta::CPAN
$_ = ""; # need a paragraph break
};
/^\@itemx?\s*(.+)?$/ and do {
if (defined $1) {
# Entity escapes prevent munging by the <> processing below.
$_ = "\n=item $ic\<$1\>\n";
} else {
$_ = "\n=item $ic\n";
$ic =~ y/A-Ya-y/B-Zb-z/;
$ic =~ s/(\d+)/$1 + 1/eg;
src/texi2pod.pl view on Meta::CPAN
s/\Q$1\E/$value/;
}
}
# Formatting commands.
# Temporary escape for @r.
s/\@r\{([^\}]*)\}/R<$1>/g;
s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g;
s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g;
s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g;
s/\@sc\{([^\}]*)\}/\U$1/g;
src/texi2pod.pl view on Meta::CPAN
return $_;
}
sub unmunge
{
# Replace escaped symbols with their equivalents.
local $_ = $_[0];
s/</E<lt>/g;
s/>/E<gt>/g;
s/{/\{/g;
view all matches for this distribution
view release on metacpan or search on metacpan
.claude/skills/perl-xs/SKILL.md view on Meta::CPAN
the pointer with `sv_setref_pv` and offers neither a free hook nor a real type
check.
## Four ways it goes wrong
1. **An unescaped `"` in the typemap.** xsubpp reads INPUT/OUTPUT templates as Perl
double-quoted strings, so a quote meant for the generated C must be written
`\"`. The failure surfaces as a C syntax error in code you never wrote.
2. **The refcount taken on the wrong SV.** `ST(0)` is the reference; `SvRV(ST(0))`
is the blessed referent carrying the magic. A child object that keeps its parent
alive must increment the **referent** â incrementing `ST(0)` survives scope exit
view all matches for this distribution
view release on metacpan or search on metacpan
inc/inc_Module-Build/Module/Build/PPMMaker.pm view on Meta::CPAN
foreach my $info (qw(name author abstract version)) {
my $method = "dist_$info";
$dist{$info} = $build->$method() or die "Can't determine distribution's $info\n";
}
$self->_simple_xml_escape($_) foreach $dist{abstract}, @{$dist{author}};
# TODO: could add <LICENSE HREF=...> tag if we knew what the URLs were for
# various licenses
my $ppd = <<"PPD";
<SOFTPKG NAME=\"$dist{name}\" VERSION=\"$dist{version}\">
inc/inc_Module-Build/Module/Build/PPMMaker.pm view on Meta::CPAN
<ARCHITECTURE NAME="%s" />
EOF
}
foreach my $codebase (@codebase) {
$self->_simple_xml_escape($codebase);
$ppd .= sprintf(<<'EOF', $codebase);
<CODEBASE HREF="%s" />
EOF
}
inc/inc_Module-Build/Module/Build/PPMMaker.pm view on Meta::CPAN
}
return $varchname;
}
{
my %escapes = (
"\n" => "\\n",
'"' => '"',
'&' => '&',
'>' => '>',
'<' => '<',
);
my $rx = join '|', keys %escapes;
sub _simple_xml_escape {
$_[1] =~ s/($rx)/$escapes{$1}/go;
}
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
share/docs/app-1c3b39672c292d36e4a5ff05c1bb7035.js view on Meta::CPAN
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
var CodeMirror=(function(){function v(aN,aK){var b2={},bk=v.defaults;for(var aA in bk){if(bk.hasOwnProperty(aA)){b2[aA]=(aK&&aK.hasOwnProperty(aA)?aK:bk)[aA]}}var aE=document.createElement("div");aE.className="CodeMirror"+(b2.lineWrapping?" CodeMirro...
view all matches for this distribution
view release on metacpan or search on metacpan
share/browser.html view on Meta::CPAN
</table>
</script>
<script id="properties-template" type="text/template">
<h2>Properties</h2>
<pre><%= _.escape(JSON.stringify(properties, null, HAL.jsonIndent)) %></pre>
</script>
<script id="request-headers-template" type="text/template">
<h2>Custom Request Headers</h2>
<textarea class="span12"></textarea>
share/browser.html view on Meta::CPAN
<script id="response-headers-template" type="text/template">
<h2>Response Headers</h2>
<pre><%= status.code %> <%= status.text %>
<%= _.escape(headers) %></pre>
</script>
<script id="response-body-template" type="text/template">
<h2>Response Body</h2>
<pre><%= _.escape(body) %></pre>
</script>
<script id="query-uri-template" type="text/template">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
view all matches for this distribution
view release on metacpan or search on metacpan
t/000_report_versions.t view on Meta::CPAN
# Error storage
$YAML::Tiny::errstr = '';
} ## end BEGIN
# Printable characters for escapes
my %UNESCAPES = (
z => "\x00",
a => "\x07",
t => "\x09",
n => "\x0a",
view all matches for this distribution
view release on metacpan or search on metacpan
xgboost/dmlc-core/include/dmlc/json.h view on Meta::CPAN
* \param os the output stream.
*/
explicit JSONWriter(std::ostream *os)
: os_(os) {}
/*!
* \brief Write a string that do not contain escape characters.
* \param s the string to be written.
*/
inline void WriteNoEscape(const std::string &s);
/*!
* \brief Write a string that can contain escape characters.
* \param s the string to be written.
*/
inline void WriteString(const std::string &s);
/*!
* \brief Write a string that can contain escape characters.
* \param v the value to be written.
* \tparam ValueType The value type to be written.
*/
template<typename ValueType>
inline void WriteNumber(const ValueType &v);
xgboost/dmlc-core/include/dmlc/json.h view on Meta::CPAN
case 'r': os << "\r"; break;
case 'n': os << "\n"; break;
case '\\': os << "\\"; break;
case '\t': os << "\t"; break;
case '\"': os << "\""; break;
default: LOG(FATAL) << "unknown string escape \\" << sch;
}
} else {
if (ch == '\"') break;
os << static_cast<char>(ch);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Xmake/Project.pm view on Meta::CPAN
method before_prepare_file (@a) { $self->_hook( 'before_prepare_file', @a ); }
method after_prepare_file (@a) { $self->_hook( 'after_prepare_file', @a ); }
method before_prepare_files (@a) { $self->_hook( 'before_prepare_files', @a ); }
method after_prepare_files (@a) { $self->_hook( 'after_prepare_files', @a ); }
# raw Lua escape hatch
method lua (@lines) {
push @$lines, map { ref($_) eq 'ARRAY' ? @$_ : $_ } @lines;
$self;
}
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Xmake.pm view on Meta::CPAN
sub _bool_str ($value) {
return $value ? 'true' : 'false' if is_bool($value);
return $value;
}
# Generic escape hatch: run any task/plugin by name.
method task ( $name, %opts ) {
my @args = $self->_extra_args( \%opts );
$self->_run( $name, @args );
}
lib/Alien/Xmake.pm view on Meta::CPAN
return qq{"$path"} if $windows && $path =~ /\s/;
$path;
}
# Safely quote arguments for Windows cmd.exe
method _escape_args (@args) { return @args }
};
#
1;
__END__
Copyright (C) Sanko Robinson.
view all matches for this distribution