view release on metacpan or search on metacpan
lib/Log/Parallel/Geo/IP.pm view on Meta::CPAN
die "IP->country code database isn't big enough (${l}K)";
}
}
}
my $ccdata;
my $tries = 0;
#
# Portions of this function are copied from David Sharnoff's
lib/Log/Parallel/Geo/IP.pm view on Meta::CPAN
sub read_data
{
my ($handle, $val, $pos) = @_;
die if $tries++ > 40;
if (defined $pos) {
pos($ccdata) = $pos;
$ccdata =~ /\G.*?\n(?=(?:"\d|\z))/gcs;
}
$pos = pos($ccdata);
$ccdata =~ /\G(.*?)\n(?=(?:"\d|\z))/gcs or return (-1, $pos);
my $line = $1;
# "4177526784","4194303999","iana","410227200","ZZ","ZZZ","Reserved"
$line =~ /"(\d+)","(\d+)",".*?","\d+",".*?",".*?",".*?"/;
lib/Log/Parallel/Geo/IP.pm view on Meta::CPAN
sub ip2cc
{
my ($ip) = @_;
unless ($ccdata) {
open my $cc, "-|", "zcat", "-f", $cc_file_location or die;
local($/) = undef;
$ccdata = <$cc>;
$ccdata =~ s/^.*?\n"/\n\n"/s;
}
$tries = 0;
$ip =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ or die;
my $val = $4 + $3 * 256 + $2 * 65536 + $1 * (256*256*256);
my $pos = binary_search(0, length($ccdata), $val, \&read_data, 0, 40);
return undef unless $pos;
pos($ccdata) = $pos;
$ccdata =~ /\G(.*?)\n(?=(?:"\d|\z))/gcs or return undef;
my $line = $1;
$line =~ /"\d+","\d+",".*?","\d+","(.*?)","(.*?)","(.*?)"/ or die;
return $1 unless wantarray;
return ($1, $2, $3);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Lufs/Glue.pm view on Meta::CPAN
}
if ($method eq 'stat' or $method eq 'setattr') {
$arg[1] = $self->hashdump($arg[1]);
}
if ($method eq 'write' or $method eq 'read') {
$arg[3] = $self->_truncdata($arg[3]);
}
if ($method eq '_init') {
$arg[0] = $self->hashdump($arg[0]);
}
if ($method eq 'GET' or $method eq 'HEAD') {
lib/Lufs/Glue.pm view on Meta::CPAN
}
$arg[0] = "'$arg[0]'";
print STDERR '['.Linux::Pid::getpid()."] $method (".join(', ', @arg).") = $ret\n";
}
sub _truncdata {
my $self = shift;
my $data = shift;
no warnings;
my $s = $data;
$s=~s{\n}{\\n}g;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MARC/Indexer.pm view on Meta::CPAN
my ($self, $marc) = @_;
my $marcref = ref($marc) ? $marc : \$marc;
# 1. Compile the indexing code if needed
$self->compile if !$self->{'is_compiled'};
# 2. Gather all fields used for indexing
my $data = marcdata($marcref, $self->{'want'});
# 3. Index each term
my %index;
while (my ($name, $term) = each %{ $self->{'terms'} }) {
next if $term->{'derived'};
my $tag = source2tag($term->{'source'});
lib/MARC/Indexer.pm view on Meta::CPAN
push @{ $index{$name} ||= [] }, @vals;
}
return \%index;
}
sub marcdata {
my ($marcref, $want) = @_;
my %data;
$data{'M'} = [$marcref];
$data{'L'} = [substr($$marcref, 0, 24)] if $want->{'L'};
my $baseaddr = substr($$marcref, 12, 5) + 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MARC/Record/Generic.pm view on Meta::CPAN
=head1 SYNOPSIS
use MARC::Record::Generic;
my $record = MARC::Record->new_from_generic( $marcdata );
$marcdata = $record->as_generic;
=head1 DESCRIPTION
This module provides routines for converting between MARC::Record objects
and Perl native data in the format of:
my $marcdata = {
leader => '01109cam a2200349 a 4500',
fields => [
'001',
' 89009461 //r92',
'005',
lib/MARC/Record/Generic.pm view on Meta::CPAN
An instance method for a MARC::Record object. Returns the objects
values as Perl primitives.
=item *
MARC::Record::new_from_generic( $marcdata )
A package method of MARC::Record which applies the values contained
in C<$data> to the object which it returns.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MIDI/XML.pm view on Meta::CPAN
'Start' => \&handle_start,
'End' => \&handle_end,
'Char' => \&handle_char,
'Proc' => \&handle_proc,
'Comment' => \&handle_comment,
'CdataStart' => \&handle_cdata_start,
'CdataEnd' => \&handle_cdata_end,
'Default' => \&handle_default,
'Unparsed' => \&handle_unparsed,
'Notation' => \&handle_notation,
'ExternEnt' => \&handle_extern_ent,
'ExternEntFin' => \&handle_extern_ent_fin,
lib/MIDI/XML.pm view on Meta::CPAN
}
#=================================================================
# CdataStart (Expat)
sub handle_cdata_start() {
my ($expat) = @_;
}
#=================================================================
# CdataEnd (Expat)
sub handle_cdata_end() {
my ($expat) = @_;
}
#=================================================================
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MIME/DB.pm view on Meta::CPAN
$VERSION = 'v1.52.0';
# generation date: 2023-01-31T03:41:54Z
# command: tools\generate.pl
# source url: https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.52.0/db.json
use constant version => 'v1.52.0';
sub data { {'application/mud+json',{source=>'iana',compressible=>1},'application/vnd.commonspace',{extensions=>['csp'],source=>'iana'},'text/x-handlebars-template',{extensions=>['hbs']},'application/vnd.dbf',{source=>'iana',extensions=>['dbf']},'appl...
1
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MIME/Type/FileName.pm view on Meta::CPAN
nsc application/x-conference
nvd application/x-navidoc
o application/octet-stream
oda application/oda
omc application/x-omc
omcd application/x-omcdatamaker
omcr application/x-omcregerator
p text/x-pascal
p10 application/pkcs10
p10 application/x-pkcs10
p12 application/pkcs-12
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MIME/types.db view on Meta::CPAN
L16;audio/l16
LBC;audio/ilbc
LE;application/vnd.bluetooth.le.oob
LTF;application/vnd.frogans.ltf
MBK;application/vnd.mobius.mbk
MC1;application/vnd.medcalcdata
MCD;application/vnd.mcd
MQY;application/vnd.mobius.mqy
MSL;application/vnd.mobius.msl
NND;application/vnd.noblenet-directory
NNS;application/vnd.noblenet-sealer
lib/MIME/types.db view on Meta::CPAN
mbd;application/x-mbedlet
mbk;application/vnd.mobius.mbk
mbox;application/mbox
mbsdf;application/vnd.mdl-mbsdf
mc$;application/x-magic-cap-package-1.0
mc1;application/vnd.medcalcdata
mc2;text/vnd.senx.warpscript
mcd;application/vnd.mcd
mcf;image/x-vasa
mcif;x-chemical/x-mmcif
mcm;x-chemical/x-macmolecule
lib/MIME/types.db view on Meta::CPAN
ogv;video/ogg
ogx;application/ogg
old;application/x-trash
oleo;application/x-oleo
omc;application/x-omc
omcd;application/x-omcdatamaker
omcr;application/x-omcregerator
omdoc;application/x-omdoc+xml
omg;audio/atrac-advanced-lossless
onepkg;application/x-onenote
onetmp;application/x-onenote
lib/MIME/types.db view on Meta::CPAN
x-nwc;nwc;;
x-nzb;nzb;;
x-object;o;;
x-oleo;oleo;;
x-omc;omc;;
x-omcdatamaker;omcd;;
x-omcregerator;omcr;;
x-omdoc+xml;omdoc;;
x-onenote;onetoc,onetoc2,onetmp,onepkg;;
x-owl+xml;owx;;
x-oz-application;oza;;
lib/MIME/types.db view on Meta::CPAN
vnd.3gpp.gmop+xml;;;
vnd.3gpp.gtpc;;;
vnd.3gpp.interworking-data;;;
vnd.3gpp.lpp;;;
vnd.3gpp.mc-signalling-ear;;;
vnd.3gpp.mcdata-affiliation-command+xml;;;
vnd.3gpp.mcdata-info+xml;;;
vnd.3gpp.mcdata-msgstore-ctrl-request+xml;;;
vnd.3gpp.mcdata-payload;;;
vnd.3gpp.mcdata-regroup+xml;;;
vnd.3gpp.mcdata-service-config+xml;;;
vnd.3gpp.mcdata-signalling;;;
vnd.3gpp.mcdata-ue-config+xml;;;
vnd.3gpp.mcdata-user-profile+xml;;;
vnd.3gpp.mcptt-affiliation-command+xml;;;
vnd.3gpp.mcptt-floor-request+xml;;;
vnd.3gpp.mcptt-info+xml;;;
vnd.3gpp.mcptt-location-info+xml;;;
vnd.3gpp.mcptt-mbms-usage-info+xml;;;
lib/MIME/types.db view on Meta::CPAN
vnd.maxar.archive.3tz+zip;3tz;;
vnd.maxmind.maxmind-db;mmdb;;
vnd.mcd;MCD;;
vnd.mdl-mbsdf;mbsdf;;
vnd.mdl;mdl;;
vnd.medcalcdata;MC1;;
vnd.mediastation.cdkey;cdkey;;
vnd.medicalholodeck.recordxr;rxr;;
vnd.mermaid;mmd,mermaid;;
vnd.mfer;mwf;;
vnd.mfmp;mfm;;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MOSES/MOBY/Data/Object.pm view on Meta::CPAN
(xrefs => 1,
provision => 1,
);
if ($name eq 'value' and $self->primitive) {
if (defined $value) {
if ($self->{cdata}) { # don't use: $self->cdata because not everybody has it
$root->appendChild (XML::LibXML::CDATASection->new ($self->_express_value ($value)));
} else {
$root->appendText ($self->_express_value ($value));
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MS/Reader/MzIdentML/Peptide.pm view on Meta::CPAN
use warnings;
use parent qw/MS::Reader::MzIdentML::SequenceItem/;
sub id { return $_[0]->{id} }
sub seq { return $_[0]->{PeptideSequence}->{pcdata} }
sub mods { return $_[0]->{Modification} }
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MSWord/ToHTML/Roles/HasHTML.pm view on Meta::CPAN
default => sub {
my $self = shift;
$self->parser->load_xml(
location =>
'http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl',
no_cdata => 1
);
},
);
has 'parser' => (
lib/MSWord/ToHTML/Roles/HasHTML.pm view on Meta::CPAN
system(
"/usr/bin/tidy", "-f",
"$base_html.err", "-m",
"-clean", "-quiet",
"--preserve-entities", "yes",
"--indent-cdata", "yes",
"--escape-cdata", "yes",
"--repeated-attributes", "keep-last",
"--char-encoding", "utf8",
"--output-encoding", "utf8",
"--merge-spans", "yes",
"--bare", "yes",
view all matches for this distribution
view release on metacpan or search on metacpan
#undef ROUTINE
#define ROUTINE "pbl_copy"
OSStatus pbl_copy (
void * pbref,
const unsigned char * cdata,
size_t size,
unsigned long id,
const char * cflavor,
PB_FLAVOR_FLAGS flags
) {
OSStatus stat;
PasteboardSyncFlags sync;
LOG_ENTRY;
LOG_ARG_P (pbref, ", ");
LOG_ARG_S (cdata, ", ");
LOG_ARG_L (size, ", ");
LOG_ARG_L (id, ", ");
LOG_ARG_S (cflavor, ")\n");
/*
/* The synch is really only needed if we have two objects
* representing the same pasteboard. */
sync = PasteboardSynchronize (pbref);
if (cdata == NULL) {
pbdata = CFDataCreate (NULL, (const unsigned char *) "", 0);
} else {
pbdata = CFDataCreate (NULL, cdata, size);
}
sflavor = PBLX_FLAVOR (cflavor);
LOG_CF ("Flavor", sflavor);
view all matches for this distribution
view release on metacpan or search on metacpan
config/sc_web.conf.sample
executableTestPath.conf
rc.sc_dbwatch
rc.sc_lbdaemon.sample
fixuplinks.pl
cdata/sc_sesswrap.c
fixup/perl2html.pl
inst/dialog.pl
inst/make_Config.pl
keyrings/pubring.gpg
keyrings/pubring.pgp
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mail/Thread/Arc.pm view on Meta::CPAN
id => "road$i",
onmouseover => "set_group_color( $i, 'blue' )",
$self->message_style( $message ),
);
$group->title->cdata( $message->header('from') );
$group->desc->cdata( "Date: " . $message->header('date') );
$group->circle(
cx => $self->message_x( $message ),
cy => $self->message_y,
r => $self->message_radius,
view all matches for this distribution
view release on metacpan or search on metacpan
Examples/helloworld/create_tables.sql view on Meta::CPAN
CREATE TABLE memcachedb
(
mckey text NOT NULL,
mcdata text NOT NULL,
CONSTRAINT memcachedb_pk PRIMARY KEY (mckey) USING INDEX TABLESPACE "RBS_INDEX1"
)
WITH (
FILLFACTOR=20,
OIDS=FALSE
Examples/helloworld/create_tables.sql view on Meta::CPAN
RETURNS void AS
$BODY$
BEGIN
LOOP
-- first try to update the key
UPDATE memcachedb SET mcdata = mc_data WHERE mckey = mc_key;
IF found THEN
RETURN;
END IF;
-- not there, so try to insert the key
-- if someone else inserts the same key concurrently,
-- we could get a unique-key failure
BEGIN
INSERT INTO memcachedb (mckey, mcdata) VALUES (mc_key, mc_data);
RETURN;
EXCEPTION WHEN unique_violation THEN
-- do nothing, and loop to try the UPDATE again
END;
END LOOP;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Markdown/Perl/Inlines.pm view on Meta::CPAN
my $html_open_tag_re = qr/ ${html_tag_name_re} ${html_attribute_re}* ${opt_html_space_re} \/? /x;
my $html_close_tag_re = qr/ \/ ${html_tag_name_re} ${opt_html_space_re} /x;
my $html_comment_re = qr/!--|!---|!--.*?--/s;
my $html_proc_re = qr/\?.*?\?/s;
my $html_decl_re = qr/![a-zA-Z].*?/s;
my $html_cdata_re = qr/!\[CDATA\[.*?\]\]/s;
my $html_tag_re =
qr/ ${html_open_tag_re} | ${html_close_tag_re} | ${html_comment_re} | ${html_proc_re} | ${html_decl_re} | ${html_cdata_re}/x;
# Bug: there is a bug in that backslash escapes donât work inside autolinks. But
# we can turn our autolinks into full-links later (where the escape should
# work). However, the spec does not test this corner case so weâre fine.
view all matches for this distribution
view release on metacpan or search on metacpan
html/lib/Marpa/R2/HTML.pm view on Meta::CPAN
my @raw_tokens = ();
my $p = HTML::Parser->new(
api_version => 3,
start_h => [
\@raw_tokens, q{tagname,'S',line,column,offset,offset_end,is_cdata,attr}
],
end_h =>
[ \@raw_tokens, q{tagname,'E',line,column,offset,offset_end,is_cdata} ],
text_h => [
\@raw_tokens,
qq{'$SYMID_WHITESPACE','T',line,column,offset,offset_end,is_cdata}
],
comment_h =>
[ \@raw_tokens, qq{'$SYMID_C','C',line,column,offset,offset_end,is_cdata} ],
declaration_h =>
[ \@raw_tokens, qq{'$SYMID_D','D',line,column,offset,offset_end,is_cdata} ],
process_h =>
[ \@raw_tokens, qq{'$SYMID_PI','PI',line,column,offset,offset_end,is_cdata} ],
unbroken_text => 1
);
$p->parse( ${$document} );
$p->eof;
my @html_parser_tokens = ();
HTML_PARSER_TOKEN:
for my $raw_token (@raw_tokens) {
my ( undef, $token_type, $line, $column, $offset, $offset_end, $is_cdata, $attr ) =
@{$raw_token};
PROCESS_TOKEN_TYPE: {
if ($is_cdata) {
$raw_token->[Marpa::R2::HTML::Internal::Token::TOKEN_ID] =
$SYMID_CDATA;
last PROCESS_TOKEN_TYPE;
}
if ( $token_type eq 'T' ) {
view all matches for this distribution
view release on metacpan or search on metacpan
"profile_url": "http://www.getpostman.com",
"username": "larry",
"password": "nocolors"
}
]
__[ ok / from http://civicdataprod4.cloudapp.net/storage/f/2015-06-29T09%3A51%3A00.364Z/amersfoort-baten-2014-v2.json ]__
{
"name": "Baten",
"src": "",
"hash": "d77751d47b47b010cc72a08dff9dccc2",
"children": [
view all matches for this distribution
view release on metacpan or search on metacpan
hoons/arvo/sys/hoon.hoon view on Meta::CPAN
$@ mark :: plain mark
$% {$tabl p/(list (pair marc marc))} :: map
== ::
++ mark @tas :: content type
++ marl (list manx) :: XML node list
++ mars {t/{n/$$ a/{i/{n/$$ v/tape} t/$~}} c/$~} :: XML cdata
++ mart (list {n/mane v/tape}) :: XML attributes
++ marx {n/mane a/mart} :: XML tag
++ mash |=(* (mass +<)) :: producing mass
++ mass (pair cord (each noun (list mash))) :: memory usage
++ mill (each vase milt) :: vase+metavase
view all matches for this distribution
view release on metacpan or search on metacpan
share/dist/MarpaX-Languages-C-AST/xslt/csl.xsl view on Meta::CPAN
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:csl="urn:csl">
<xsl:output method="xml" omit-xml-declaration="no" cdata-section-elements="size" />
<!-- =================================================================== -->
<!-- MAIN -->
<!-- =================================================================== -->
view all matches for this distribution
view release on metacpan or search on metacpan
t/jquery-1.10.2.t view on Meta::CPAN
},
// Contents
"empty": function( elem ) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
// not comment, processing instructions, or others
// Thanks to Diego Perini for the nodeName shortcut
// Greater than "@" means alpha characters (specifically not starting with "#" or "?")
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
view all matches for this distribution
view release on metacpan or search on metacpan
samples/p_pgm_geni.srj view on Meta::CPAN
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\p8_bop.pbl,w_bop,w
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\dw2xls_pb115.pbd,n_cst_hash_long_entry,u
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\p8_25.pbl,dw_iml_25_p1,d
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\p9_plugins.pbl,nv_import_plugin,u
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\company.pbl,push_sa,f
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\pbdom115.pbd,pbdom_cdata,u
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\p8_create.pbl,nv_new_report,u
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\p8_15s.pbl,dw_iml_15s_p2,d
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\p8_14c.pbl,dw_iml_14c_pcrsa,d
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\rpt_64c2.pbl,dw_iml_64c2_pcrsecsa,d
OBJ:C:\Developpement\Powerbuilder\Pgm\trunk\Sources\p8_cfg.pbl,w_preselection_resp,w
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Math/Cephes/Matrix.pm view on Meta::CPAN
die "Matrices must be square" unless $m == $n;
}
my ($coef, $n);
if ($refer) {
$n = $caller->{n};
my $cdata = $caller->{coef};
foreach (@$cdata) {
push @$coef, [ @$_];
}
}
else {
($coef, $n) = ($arr, scalar @$arr);
view all matches for this distribution
view release on metacpan or search on metacpan
my $ntuple = Math::GSL::NTuple::gsl_ntuple->new;
$ntuple = gsl_ntuple_open('ntuple', $data, $self->{size} );
ok_status(gsl_ntuple_read($ntuple));
my $cdata = $ntuple->swig_ntuple_data_get ;
# warn Dumper [ $data, $cdata ];
ok_status(gsl_ntuple_close($ntuple));
}
sub GSL_NTUPLE_GSL_NTUPLE: Tests(1) {
my $ntuple = Math::GSL::NTuple::gsl_ntuple->new;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Math/Geometry/Construction/Draw/SVG.pm view on Meta::CPAN
($args{x}, $args{y}) = $self->transform_coordinates
($args{x}, $args{y});
my $data = delete $args{text};
my $text = $self->output->text(%args);
$text->cdata($data);
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Math/Prime/Util.pm view on Meta::CPAN
say chebyshev_theta(92384234);
say partitions(1000);
# Show all prime partitions of 25
forpart { say "@_" unless scalar grep { !is_prime($_) } @_ } 25;
# List all 3-way combinations of an array
my @cdata = qw/apple bread curry donut eagle/;
forcomb { say "@cdata[@_]" } @cdata, 3;
# or all permutations
forperm { say "@cdata[@_]" } @cdata;
# divisor sum
my $sigma = divisor_sum( $n ); # sum of divisors
my $sigma0 = divisor_sum( $n, 0 ); # count of divisors
my $sigmak = divisor_sum( $n, $k );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Module/Dependency/Grapher.pm view on Meta::CPAN
$im->text(
'x' => 5,
'y' => 12,
'fill' => $colours->{'title1'},
'style' => { 'font-size' => '12px' }
)->cdata($imgtitle);
$im->text(
'x' => 5,
'y' => 23,
'fill' => $colours->{'title1'},
'style' => { 'font-size' => '9px' }
)->cdata( "Grapher.pm $VERSION - " . localtime() )
unless $options->{'NoVersion'};
_drawLegend( $im, $colours, $realImgWidth - 160 - $eOffset, 3 ) unless $options->{'NoLegend'};
$im->title( id => 'document-title' )->cdata($imgtitle);
$im->desc( id => 'document-desc' )
->cdata('This image shows dependency relationships between perl programs and modules');
TRACE("Printing SVG");
local *IMG;
open( IMG, "> $filename" ) or die("Can't open $filename for image write: $!");
print IMG $im->xmlify;
lib/Module/Dependency/Grapher.pm view on Meta::CPAN
$im->anchor( -href => sprintf( $colours->{'_HREF_FORMAT'}, $text ) )->text(
'x' => $x,
'y' => $y + 5.5,
'fill' => $colours->{'type'},
'style' => { 'font-size' => '8px', 'font-family' => 'Courier, Monaco, monospaced' }
)->cdata($text);
}
else {
$im->text(
'x' => $x,
'y' => $y + 5.5,
'fill' => $colours->{'type'},
'style' => { 'font-size' => '8px', 'font-family' => 'Courier, Monaco, monospaced' }
)->cdata($text);
}
}
}
# ! behaves differently for each image type
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Module/Patch.pm view on Meta::CPAN
}
}
# read patch module's configs
no warnings 'once';
my $pcdata = $pdata->{config} // {};
my $config = \%{"$self\::config"};
while (my ($k, $v) = each %$pcdata) {
die "Invalid configuration defined by $self\::patch_data(): ".
"$k: must start with dash" unless $k =~ /\A-/;
$config->{$k} = $v->{default};
if (exists $opts{$k}) {
$config->{$k} = $opts{$k};
view all matches for this distribution
view release on metacpan or search on metacpan
files/syntax_highlight/prettify.js view on Meta::CPAN
// a probable tag that should not be highlighted
+ '|<\/?[a-zA-Z](?:[^>\"\']|\'[^\']*\'|\"[^\"]*\")*>'
+ '|<', // A '<' that does not begin a larger chunk
'g');
var pr_commentPrefix = /^<\!--/;
var pr_cdataPrefix = /^<!\[CDATA\[/;
var pr_brPrefix = /^<br\b/i;
var pr_tagNameRe = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;
/** split markup into chunks of html tags (style null) and
* plain text (style {@link #PR_PLAIN}), converting tags which are
files/syntax_highlight/prettify.js view on Meta::CPAN
if (matches) {
for (var i = 0, n = matches.length; i < n; ++i) {
var match = matches[i];
if (match.length > 1 && match.charAt(0) === '<') {
if (pr_commentPrefix.test(match)) { continue; }
if (pr_cdataPrefix.test(match)) {
// strip CDATA prefix and suffix. Don't unescape since it's CDATA
sourceBuf.push(match.substring(9, match.length - 3));
sourceBufLen += match.length - 12;
} else if (pr_brPrefix.test(match)) {
// <br> tags are lexically significant so convert them to text.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojo/DOM/Role/Restrict.pm view on Meta::CPAN
# Comment
return '<!--' . $tree->[1] . '-->' if $type eq 'comment';
# CDATA
return '<![CDATA[' . $tree->[1] . ']]>' if $type eq 'cdata';
# Processing instruction
return '<?' . $tree->[1] . '?>' if $type eq 'pi';
# Everything else
view all matches for this distribution