view release on metacpan or search on metacpan
lib/Mojo/DOM58.pm view on Meta::CPAN
my $text = '';
while (my $node = shift @$nodes) {
my $type = $node->[0];
# Text
if ($type eq 'text' || $type eq 'cdata' || $type eq 'raw') {
$text .= $node->[1];
}
# Nested tag
elsif ($type eq 'tag' && $all) {
lib/Mojo/DOM58.pm view on Meta::CPAN
<html>
<head><title>Hello</title></head>
<body>World!</body>
</html>
There are currently eight different kinds of nodes, C<cdata>, C<comment>,
C<doctype>, C<pi>, C<raw>, C<root>, C<tag> and C<text>. Elements are nodes of
the type C<tag>.
root
|- doctype (html)
lib/Mojo/DOM58.pm view on Meta::CPAN
=head2 type
my $type = $dom->type;
This node's type, usually C<cdata>, C<comment>, C<doctype>, C<pi>, C<raw>,
C<root>, C<tag> or C<text>.
# "cdata"
$dom->parse('<![CDATA[Test]]>')->child_nodes->first->type;
# "comment"
$dom->parse('<!-- Test -->')->child_nodes->first->type;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojo/SinaWeibo.pm view on Meta::CPAN
}
}
elsif($m->{data}{type} eq "synchroniz" ){
return unless exists $m->{data}{syncData};
my $syncdata = decode_json(encode("utf8",$m->{data}{syncData}));
return unless exists $syncdata->{msg};
return unless exists $syncdata->{uid};
my $time = exists $syncdata->{'time'}?int($syncdata->{'time'}/1000):CORE::time;
my($uid,$msg) = ($syncdata->{uid}, $syncdata->{msg});
my $u = $s->search_im_user(uid=>$uid);
my $nick = defined $u?$u->{nick}:"å°å°";
$s->emit("send_message",{uid=>$uid,nick=>$nick,content=>$msg,'time'=>$time},"sync");
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
root/static/css/prism.css view on Meta::CPAN
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojolicious/Plugin/DBViewer/public/js/jquery-1.9.1.js 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
lib/Mojolicious/Plugin/MySQLViewerLite/public/js/jquery-1.9.1.js 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
lib/Mojolicious/Plugin/SQLiteViewerLite/public/js/jquery-1.9.1.js 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
share/resources/public/swagger-ui/swagger-ui-bundle.js view on Meta::CPAN
/*!
* 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.
*
share/resources/public/swagger-ui/swagger-ui-bundle.js view on Meta::CPAN
*
* 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
lib/Mojolicious/Plugin/Tables/resources/public/js/tables.js view on Meta::CPAN
function(){document.location = shipped.urlbase + '/tables/' + dtTableTabName + '/' + $(this).attr('id') + '/view'}
);
}
function enable_buts($fldset) {
var cdata = $fldset.data();
var $buts = $fldset.find('div.stats button');
if (cdata.total <= 10) $buts.button('disable');
else {
// strange or'd conditions here can only apply when full(>10) list showing; effect is revert to paged.
$buts.filter('.start').button(cdata.offset>0 || cdata.to==cdata.total ? 'enable': 'disable');
$buts.filter('.prev' ).button(cdata.offset>0 ? 'enable': 'disable');
$buts.filter('.next' ).button(cdata.to<cdata.total ? 'enable': 'disable');
$buts.filter('.end' ).button(cdata.offset==0 || cdata.to<cdata.total ? 'enable': 'disable');
}
// re-enable add-butt unless on delete-verify page
if ($('div#tablesbody.del').length==0) $buts.filter('.add').button('enable');
}
lib/Mojolicious/Plugin/Tables/resources/public/js/tables.js view on Meta::CPAN
return false;
});
$('fieldset.group').each(function(){
var $fldset = $(this);
var cdata = $fldset.data();
cdata.offset = 0;
cdata.from = 1;
$fldset.find('div.stats button').click(function() {
var $this = $(this);
if ($this.hasClass('add' )) {
var href = '/tables/' + shipped.table + '/' + shipped.id + '/add_child/' + cdata.collection;
document.location = shipped.urlbase + href;
return false;
}
if ($this.hasClass('prev' )) cdata.offset = cdata.offset<10? 0: cdata.offset-10;
if ($this.hasClass('start')) cdata.offset = 0;
if ($this.hasClass('next' )) cdata.offset += 10;
if ($this.hasClass('end' )) cdata.offset = -1;
if ($this.hasClass('list' )) cdata.offset = -2;
var url = shipped.urlbase + '/tables/' + shipped.table + '/' + shipped.id + '/' + cdata.collection + '.json';
$.post(url, {offset:cdata.offset})
.done(function(rows){
$('table.rows', $fldset).empty().append(
$.map(rows, function(d,i){
var href = shipped.urlbase + '/tables/' + cdata.ctable + '/' + d.id + '/view';
return '<tr><td><a href="' + href + '">'+d.label+'</a></td></tr>'
})
);
if (cdata.offset == -1) { // final page was requested and returned
cdata.to = cdata.total;
cdata.offset = cdata.total - rows.length;
} else if (cdata.offset == -2) { // all rows were returned
cdata.to = cdata.total;
cdata.offset = 0;
} else {
cdata.to = cdata.offset + rows.length;
}
cdata.from = cdata.offset + 1;
var newNumbers = cdata.from + ' to ' + cdata.to + ' of ' + cdata.total;
$('span.numbers', $fldset).text(newNumbers);
enable_buts($fldset);
})
.fail(ajaxerror)
});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mojo/DOM.pm view on Meta::CPAN
my $text = '';
while (my $node = shift @$nodes) {
my $type = $node->[0];
# Text
if ($type eq 'text' || $type eq 'cdata' || $type eq 'raw') { $text .= $node->[1] }
# Nested tag
elsif ($type eq 'tag' && $all) {
unshift @$nodes, @{_nodes($node)} if $xml || ($node->[1] ne 'script' && $node->[1] ne 'style');
}
lib/Mojo/DOM.pm view on Meta::CPAN
<html>
<head><title>Hello</title></head>
<body>World!</body>
</html>
There are currently eight different kinds of nodes, C<cdata>, C<comment>, C<doctype>, C<pi>, C<raw>, C<root>, C<tag>
and C<text>. Elements are nodes of the type C<tag>.
root
|- doctype (html)
+- tag (html)
lib/Mojo/DOM.pm view on Meta::CPAN
=head2 type
my $type = $dom->type;
This node's type, usually C<cdata>, C<comment>, C<doctype>, C<pi>, C<raw>, C<root>, C<tag> or C<text>.
# "cdata"
$dom->parse('<![CDATA[Test]]>')->child_nodes->first->type;
# "comment"
$dom->parse('<!-- Test -->')->child_nodes->first->type;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MooX/Role/REST.pm view on Meta::CPAN
my $self = shift;
$self->validate_positional_parameters(
[
$self->parameter(http_method => $self->Required, { store => \my $hmethod }),
$self->parameter(call_path => $self->Required, { store => \my $cpath }),
$self->parameter(call_data => $self->Optional, { store => \my $cdata }),
],
\@_
);
my $endpoint = $self->base_uri->clone;
lib/MooX/Role/REST.pm view on Meta::CPAN
$endpoint->path($path);
my @body;
# GET and DELETE have no body
if ($hmethod =~ m{^ (?: GET | DELETE ) $}x) {
my $params = $cdata ? $self->www_form_urlencode($cdata) : '';
$endpoint->query($params) if $params;
}
else {
@body = $cdata ? { content => encode_json($cdata) } : ();
}
print STDERR ">>>$hmethod($endpoint)>>>@body<<<\n"
if $DEBUG;
my $response = $self->request($hmethod, $endpoint->as_string, @body);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Mozilla/DOM/Node.pod view on Meta::CPAN
The name of the attribute
=item CDATASection
#cdata-section
=item Comment
#comment
view all matches for this distribution
view release on metacpan or search on metacpan
htdocs/src-min/mode-coldfusion.js view on Meta::CPAN
define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={s...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MySQL/Workbench/Parser/MySQLParser.pm view on Meta::CPAN
type => 'UNIQUE',
fields => $fdata->{'name'},
) or die $table->error;
}
for my $cdata ( @{ $fdata->{'constraints'} } ) {
next unless $cdata->{'type'} eq 'foreign_key';
$cdata->{'fields'} ||= [ $field->name ];
push @{ $tdata->{'constraints'} }, $cdata;
}
}
for my $idata ( @{ $tdata->{'indices'} || [] } ) {
lib/MySQL/Workbench/Parser/MySQLParser.pm view on Meta::CPAN
@cleaned_options = @options;
}
$table->options( \@cleaned_options ) or die $table->error;
}
for my $cdata ( @{ $tdata->{'constraints'} || [] } ) {
my $constraint = $table->add_constraint(
name => $cdata->{'name'},
type => $cdata->{'type'},
fields => $cdata->{'fields'},
expression => $cdata->{'expression'},
reference_table => $cdata->{'reference_table'},
reference_fields => $cdata->{'reference_fields'},
match_type => $cdata->{'match_type'} || '',
on_delete => $cdata->{'on_delete'}
|| $cdata->{'on_delete_do'},
on_update => $cdata->{'on_update'}
|| $cdata->{'on_update_do'},
) or die $table->error;
}
# After the constrains and PK/idxs have been created,
# we normalize fields
view all matches for this distribution
view release on metacpan or search on metacpan
lib/NLP/GATE/Document.pm view on Meta::CPAN
## get the attribute id
my $nodeid = _getAttr($c,"id");
$nodemap{$nodeid} = $offset;
} elsif($c->nodeType() == 3 || $c->nodeType() == 4) {
## 3: text
## 4: cdata
my $t = $c->textContent();
$offset += length($t);
$text .= $t;
} else {
croak "Invalid node type encountered: ",$c->nodeType(),"\n";
view all matches for this distribution
view release on metacpan or search on metacpan
build/lib/src/connection.c view on Meta::CPAN
static struct neo4j_request *new_request(neo4j_connection_t *connection);
static void pop_request(neo4j_connection_t* connection);
static int initialize(neo4j_connection_t *connection);
static int initialize_callback(void *cdata, neo4j_message_type_t type,
const neo4j_value_t *argv, uint16_t argc);
static int ack_failure(neo4j_connection_t *connection );
static int ack_failure_callback(void *cdata, neo4j_message_type_t type,
const neo4j_value_t *argv, uint16_t argc);
static int hello(neo4j_connection_t *connection);
static int goodbye(neo4j_connection_t *connection);
build/lib/src/connection.c view on Meta::CPAN
neo4j_log_debug(connection->logger, "rcvd %s in response to %s (%p)",
neo4j_message_type_str(type),
neo4j_message_type_str(request->type), (void *)request);
// request callback executed here
int result = request->receive(request->cdata, type, argv, argc);
int errsv = errno;
if (result <= 0)
{
pop_request(connection);
(connection->inflight_requests)--;
build/lib/src/connection.c view on Meta::CPAN
&(connection->request_queue[connection->request_queue_head]);
neo4j_log_trace(connection->logger, "draining %s (%p) from queue on %p",
neo4j_message_type_str(request->type),
(void *)request, (void *)connection);
int result = request->receive(request->cdata, NULL, NULL, 0);
assert(result <= 0);
if (err == 0 && result < 0)
{
err = -1;
errsv = errno;
build/lib/src/connection.c view on Meta::CPAN
connection->request_queue_head = 0;
}
}
struct init_cdata
{
neo4j_connection_t *connection;
int error;
};
build/lib/src/connection.c view on Meta::CPAN
if (req == NULL)
{
goto cleanup;
}
struct init_cdata cdata = { .connection = connection, .error = 0 };
req->type = NEO4J_INIT_MESSAGE;
if (connection->version < 3)
{
req->_argv[0] = neo4j_string(config->client_id);
build/lib/src/connection.c view on Meta::CPAN
req->_argv[0] = neo4j_map(auth_token, 4);
req->argv = req->_argv;
req->argc = 1;
}
req->receive = initialize_callback;
req->cdata = &cdata;
neo4j_log_trace(connection->logger,
(connection->version < 3)?
"enqu INIT{\"%s\", {scheme: basic, principal: \"%s\", "
"credentials: ****}} (%p) in %p" :
build/lib/src/connection.c view on Meta::CPAN
config->client_id, config->username,
(void *)req, (void *)connection);
if (neo4j_session_sync(connection, NULL))
{
if (cdata.error != 0)
{
errno = cdata.error;
}
goto cleanup;
}
if (cdata.error != 0)
{
assert(cdata.error == NEO4J_INVALID_CREDENTIALS ||
cdata.error == NEO4J_AUTH_RATE_LIMIT);
errno = cdata.error;
goto cleanup;
}
err = 0;
build/lib/src/connection.c view on Meta::CPAN
}
neo4j_log_trace(connection->logger, "sent GOODBYE in %p", (void *)connection);
return 0;
}
int initialize_callback(void *cdata, neo4j_message_type_t type,
const neo4j_value_t *argv, uint16_t argc)
{
if (type == NULL)
{
return 0;
}
assert(cdata != NULL);
neo4j_connection_t *connection = ((struct init_cdata *)cdata)->connection;
char description[128];
#ifndef NEOCLIENT_BUILD
if (type == NEO4J_SUCCESS_MESSAGE)
build/lib/src/connection.c view on Meta::CPAN
errno = NEO4J_SERVER_REQUIRES_SECURE_CONNECTION;
goto cleanup;
}
if (strcmp("Neo.ClientError.Security.Unauthorized", details.code) == 0)
{
((struct init_cdata *)cdata)->error = NEO4J_INVALID_CREDENTIALS;
result = 0;
goto cleanup;
}
if (strcmp("Neo.ClientError.Security.AuthenticationRateLimit",
details.code) == 0)
{
((struct init_cdata *)cdata)->error = NEO4J_AUTH_RATE_LIMIT;
result = 0;
goto cleanup;
}
neo4j_log_error(connection->logger, "Session initialization failed: %s",
build/lib/src/connection.c view on Meta::CPAN
}
req->type = (connection->version < 3)? NEO4J_ACK_FAILURE_MESSAGE :
NEO4J_RESET_MESSAGE;
req->argc = 0;
req->receive = ack_failure_callback;
req->cdata = connection;
neo4j_log_trace(connection->logger, "enqu %s (%p) in %p",
(connection->version < 3)? "ACK_FAILURE" : "RESET",
(void *)req, (void *)connection);
return neo4j_session_sync(connection, NULL);
}
int ack_failure_callback(void *cdata, neo4j_message_type_t type,
const neo4j_value_t *argv, uint16_t argc)
{
assert(cdata != NULL);
neo4j_connection_t *connection = (neo4j_connection_t *)cdata;
char buf[12];
strcpy(buf, (connection->version < 3)? "ACK_FAILURE" : "RESET");
#ifndef NEOCLIENT_BUILD
if (type == NEO4J_IGNORED_MESSAGE || type == NULL)
build/lib/src/connection.c view on Meta::CPAN
}
int neo4j_session_run(neo4j_connection_t *connection, neo4j_mpool_t *mpool,
const char *statement, neo4j_value_t params, neo4j_value_t extra,
neo4j_response_recv_t callback, void *cdata)
{
REQUIRE(connection != NULL, -1);
REQUIRE(mpool != NULL, -1);
REQUIRE(statement != NULL, -1);
REQUIRE(neo4j_type(params) == NEO4J_MAP || neo4j_is_null(params), -1);
build/lib/src/connection.c view on Meta::CPAN
req->_argv[2] = neo4j_is_null(extra)? neo4j_map(NULL,0) : extra;
req->argv = req->_argv;
req->argc = (connection->version > 2)? 3 : 2;
req->mpool = mpool;
req->receive = callback;
req->cdata = cdata;
if (neo4j_log_is_enabled(connection->logger, NEO4J_LOG_TRACE))
{
char buf[1024];
if (connection->version < 3)
build/lib/src/connection.c view on Meta::CPAN
neo4j_atomic_bool_set(&(connection->processing), false);
return err;
}
int neo4j_session_pull_all(neo4j_connection_t *connection, int n, int qid,
neo4j_mpool_t *mpool, neo4j_response_recv_t callback, void *cdata)
{
REQUIRE(connection != NULL, -1);
REQUIRE(mpool != NULL, -1);
REQUIRE(callback != NULL, -1);
build/lib/src/connection.c view on Meta::CPAN
req->argv = req->_argv;
req->argc = 1;
}
req->mpool = mpool;
req->receive = callback;
req->cdata = cdata;
if (connection->version < 4)
{
neo4j_log_trace(connection->logger, "enqu PULL_ALL (%p) in %p",
(void *)req, (void *)connection);
}
build/lib/src/connection.c view on Meta::CPAN
return err;
}
int neo4j_session_discard_all(neo4j_connection_t *connection, int n, int qid,
neo4j_mpool_t *mpool, neo4j_response_recv_t callback, void *cdata)
{
REQUIRE(connection != NULL, -1);
REQUIRE(mpool != NULL, -1);
REQUIRE(callback != NULL, -1);
build/lib/src/connection.c view on Meta::CPAN
req->argv = req->_argv;
req->argc = 1;
}
req->mpool = mpool;
req->receive = callback;
req->cdata = cdata;
if (connection->version < 4)
{
neo4j_log_trace(connection->logger, "enqu DISCARD_ALL (%p) in %p",
(void *)req, (void *)connection);
build/lib/src/connection.c view on Meta::CPAN
cleanup:
neo4j_atomic_bool_set(&(connection->processing), false);
return err;
}
int neo4j_session_transact(neo4j_connection_t *connection, const char*msg_type, neo4j_response_recv_t callback, void *cdata)
{
REQUIRE(connection != NULL, -1);
REQUIRE(cdata != NULL, -1);
REQUIRE(callback != NULL, -1);
neo4j_transaction_t *tx = (neo4j_transaction_t *) cdata;
int err = -1;
struct neo4j_request *req = new_request(connection);
if (req == NULL)
{
goto cleanup;
build/lib/src/connection.c view on Meta::CPAN
req->argv = NULL;
req->argc = 0;
}
req->mpool = &(tx->mpool);
req->receive = callback; // callback specified in transaction.c
req->cdata = cdata; // this will be the neo4j_transaction_t object
if (neo4j_log_is_enabled(connection->logger,NEO4J_LOG_TRACE)) {
neo4j_log_trace(connection->logger, "enqu %s (%p) in %p",
msg_type, (void *)req, (void *)connection);
}
if (neo4j_session_sync(connection,NULL)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/Async/HTTP/DAV/XML.pod view on Meta::CPAN
=over 4
=item L<XML::SAX::Base>
L<attlist_decl|XML::SAX::Base/attlist_decl>, L<attribute_decl|XML::SAX::Base/attribute_decl>, L<comment|XML::SAX::Base/comment>, L<doctype_decl|XML::SAX::Base/doctype_decl>, L<element_decl|XML::SAX::Base/element_decl>, L<end_cdata|XML::SAX::Base/end_...
=back
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
TLSProfile.pm view on Meta::CPAN
if ($el->nodeName eq 'ready') {
# FIXME: deal with version attribute.
# send <profile> response ourselves.
my $proceed_cdata = new XML::LibXML::CDATASection("<proceed />");
$session->{mgmt_profile}->send_profile_message
($session, $message->msgno(), $self->uri(), $proceed_cdata, 0);
# start TLS
$self->_start_TLS($session);
# inform the management profile to do nothing else.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/BEEP/Lite/MgmtProfile.pm view on Meta::CPAN
$start_el->appendChild($profile_el);
# FIXME: should be able to pass in a Node or string as data.
if ($data) {
if (!ref($data)) {
my $cdata = XML::LibXML::CDATASection->new($data);
$profile_el->appendChild($cdata);
} elsif ($data->isa('XML::LibXML::CDATASection')) {
$profile_el->appendChild($data);
}
$profile_el->setAttribute("encoding", "base64") if $encoding;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/Chat/Daemon.pm view on Meta::CPAN
my $attachments_node = $message->{TREE}->XPath("attachments");
my @attachments = $attachments_node ? $attachments_node->children() : ();
foreach my $node (@attachments) {
my %attachment;
foreach ($node->children()) {
$attachment{$_->get_tag()} = $_->get_cdata();
}
push @args, \%attachment;
}
# Lookup the handler for this command and call it, then send back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/DNS/Extlang.pm view on Meta::CPAN
# turn fields into binary data
# triple of pack codes, and code to create the stuff to pack, size
# default code is the field
# size of -1 means unknown, will fail if something later wants it
# stores the data into $encdata
sub _fieldencode {
my ($rrfields) = @_;
my ($packpat, @args, $packcode);
lib/Net/DNS/Extlang.pm view on Meta::CPAN
# handle names that need to know the offset
if($field =~ m{#O#}) {
if($packpat) { # flush out any pending stuff
if($packcode) {
$packcode .= "\t\$encdata .= ";
} else {
$packcode = "\t\$encdata = ";
}
if($packpat =~ m{^(a\*)+$}) { # all a's, just concat
$packcode .= join(" . ", @args) . ";\n";
} else {
$packcode .= "pack '$packpat'," . join(", ", @args) . ";\n";
}
$packpat = ""; @args = ();
}
if($packcode) {
$field =~ s{#O#}{\$offset+(length \$encdata)};
} else {
$field =~ s{#O#}{\$offset}; # first field, plain offset
}
}
$packpat .= $pat;
lib/Net/DNS/Extlang.pm view on Meta::CPAN
}
}
# now generate the code
if($packpat) {
if($packcode) {
$packcode .= "\t\$encdata .= ";
} else {
$packcode = "\t\$encdata = ";
}
if($packpat =~ m{^(a\*)+$}) { # all a's, just concat
$packcode .= join(" . ", @args) . ";\n";
} else {
$packcode .= "pack '$packpat'," . join(", ", @args) . ";\n";
lib/Net/DNS/Extlang.pm view on Meta::CPAN
}
return $packcode ? <<"CODE" : '';
sub _encode_rdata { ## encode rdata as wire-format octet string
my (\$self, \$offset, \@opaque) = \@_;
my \$encdata = '';
$packcode}
CODE
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/DRI/Protocol/EPP/Core/Contact.pm view on Meta::CPAN
push @d,['contact:fax'] if exists($d->{fax});
push @d,['contact:email'] if exists($d->{email});
return ['contact:disclose',@d,{flag=>(keys(%v))[0]}];
}
sub build_cdata
{
my ($contact,$v)=@_;
my $hasloc=$contact->has_loc();
my $hasint=$contact->has_int();
if ($hasint && !$hasloc && (($v & 5) == $v))
lib/Net/DRI/Protocol/EPP/Core/Contact.pm view on Meta::CPAN
my $mes=$epp->message();
my @d=build_command($mes,'create',$contact);
Net::DRI::Exception->die(1,'protocol/EPP',10,'Invalid contact '.$contact) unless Net::DRI::Util::isa_contact($contact);
$contact->validate(); ## will trigger an Exception if needed
push @d,build_cdata($contact,$epp->{contacti18n});
$mes->command_body(\@d);
}
sub create_parse
{
lib/Net/DRI/Protocol/EPP/Core/Contact.pm view on Meta::CPAN
my $newc=$todo->set('info');
if (defined $newc)
{
Net::DRI::Exception->die(1,'protocol/EPP',10,'Invalid contact '.$newc) unless Net::DRI::Util::isa_contact($newc);
$newc->validate(1); ## will trigger an Exception if needed
my @c=build_cdata($newc,$epp->{contacti18n});
push @d,['contact:chg',@c] if @c;
}
$mes->command_body(\@d);
}
view all matches for this distribution
view release on metacpan or search on metacpan
dropbear/libtomcrypt/src/pk/rsa/rsa_import_pkcs8.c view on Meta::CPAN
err=der_decode_sequence(in, inlen, top_seq_e, 2UL);
if (err == CRYPT_OK) {
LTC_UNUSED_PARAM(passwd);
LTC_UNUSED_PARAM(passwdlen);
/* XXX: TODO encrypted pkcs8 not implemented yet */
/* fprintf(stderr, "decrypt: iter=%ld salt.len=%ld encdata.len=%ld\n", mp_get_int(iter), key_seq_e[0].size, top_seq_e[1].size); */
err = CRYPT_PK_INVALID_TYPE;
goto LBL_ERR;
}
else {
decrypted = (unsigned char *)in;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/EPP/Server.pm view on Meta::CPAN
my ($self, $xml) = @_;
return XML::LibXML->load_xml(
string => $xml,
no_blanks => 1,
no_cdata => 1,
);
}
sub validate_frame {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/FTPTurboSync/PrgOpts.pm view on Meta::CPAN
}
sub netRC {
my ( $self ) = @_;
if ( ($self->{ftpserver} ne "") and ($self->{ftppasswd} eq "anonymous") ) {
if ($self->{ftpuser} eq "ftp") {
my $netrcdata = Net::Netrc->lookup($self->{ftpserver});
if ( defined $netrcdata ) {
$self->{ftpuser} = $netrcdata->login;
$self->{ftppasswd} = $netrcdata->password;
}
} else {
my $netrcdata = Net::Netrc->lookup($self->{ftpserver},$self->{ftpuser});
if ( defined $netrcdata ) {
$self->{ftppasswd} = $netrcdata->password;
}
}
}
}
sub validateFtp {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/Flickr/RDF.pm view on Meta::CPAN
if (! exists($data->{users}->{$user->{user_id}})) {
$data->{users}->{$user->{user_id}} = $user;
}
my %cdata = (user_id => $user->{user_id},
content => $c->string_value(),
date => $c->getAttribute("datecreate"),
id => $c->getAttribute("id"));
$comments{$permalink} = \%cdata;
}
}
return \%comments;
}
view all matches for this distribution
view release on metacpan or search on metacpan
=head1 SYNOPSIS
use Net::FreeDB;
$freedb = Net::FreeDB->new();
$discdata = $freedb->getdiscdata('/dev/cdrom');
my $cddb_file_object = $freedb->read('rock', $discdata->{ID});
print $cddb_file_object->id;
=head1 DESCRIPTION
Net::FreeDB was inspired by Net::CDDB. And in-fact
NOTE: See BUGS
=item get_local_disc_data
Parameters:
getdiscdata($) takes the device you want to use. See getdiscid()
for full description.
getdiscdata() returns a hash of the given disc data as you would
require for a call to query. The returns hash look like:
{
ID => 'd00b3d10',
NUM_TRKS => '3',
=back
=head1 BUGS
The current version of getdiscid() and getdiscdata()
on the Windows platform takes ANY string in a single
cdrom configuration and works fine. That is if you
only have 1 cdrom drive; you can pass in ANY string
and it will still scan that cdrom drive and return
the correct data. If you have more then 1 cdrom drive
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/FullAuto/FA_Core.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
share/services_hashes_dump.yml view on Meta::CPAN
11103:
- origo-sync
11104:
- netapp-icmgmt
11105:
- netapp-icdata
11106:
- sgi-lk
11108:
- myq-termlink
11109:
share/services_hashes_dump.yml view on Meta::CPAN
11104:
tcp:
- netapp-icmgmt
11105:
tcp:
- netapp-icdata
11106:
tcp:
- sgi-lk
udp:
- sgi-lk
share/services_hashes_dump.yml view on Meta::CPAN
- 2450
netagent:
- 5771
netangel:
- 2442
netapp-icdata:
- 11105
netapp-icmgmt:
- 11104
netarx:
- 1040
share/services_hashes_dump.yml view on Meta::CPAN
udp:
2442:
desc: Netangel
name: netangel
note: ''
netapp-icdata:
tcp:
11105:
desc: NetApp Intercluster Data
name: netapp-icdata
note: ''
netapp-icmgmt:
tcp:
11104:
desc: NetApp Intercluster Management
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/Jabber/Dialback/Result.pm view on Meta::CPAN
GetFrom() - returns a string with server that the <db:result/> is being
sent from.
GetType() - returns a string with the type <db:result/> this is.
GetData() - returns a string with the cdata of the <db:result/>.
GetXML() - returns the XML string that represents the <db:result/>.
This is used by the Send() function in Server.pm to send
this object as a Jabber Dialback Result.
lib/Net/Jabber/Dialback/Result.pm view on Meta::CPAN
SetType(string) - sets the type attribute. Valid settings are:
valid
invalid
SetData(string) - sets the cdata of the <db:result/>.
=head2 Test functions
DefinedTo() - returns 1 if the to attribute is defined in the
<db:result/>, 0 otherwise.
view all matches for this distribution
view release on metacpan or search on metacpan
libnfs/include/libnfs-private.h view on Meta::CPAN
struct nfs_cb_data;
void free_nfs_cb_data(struct nfs_cb_data *data);
struct nfs_specdata {
uint32_t specdata1;
uint32_t specdata2;
};
struct nfs_time {
uint32_t seconds;
uint32_t nseconds;
};
libnfs/include/libnfs-private.h view on Meta::CPAN
uint32_t gid;
uint32_t nlink;
uint64_t size;
uint64_t used;
uint64_t fsid;
struct nfs_specdata rdev;
struct nfs_time atime;
struct nfs_time mtime;
struct nfs_time ctime;
};
view all matches for this distribution