Result:
found more than 953 distributions - search limited to the first 2001 files matching your query ( run in 1.241 )


Alien-TinyCC

 view release on metacpan or  search on metacpan

src/i386-asm.c  view on Meta::CPAN

{
    const ASMInstr *pa;
    int i, modrm_index, reg, v, op1, is_short_jmp, seg_prefix;
    int nb_ops, s;
    Operand ops[MAX_OPERANDS], *pop;
    int op_type[3]; /* decoded op type */
#ifdef I386_ASM_16
    static int a32 = 0, o32 = 0, addr32 = 0, data32 = 0;
#endif

    /* force synthetic ';' after prefix instruction, so we can handle */

 view all matches for this distribution


Alien-TinyCCx

 view release on metacpan or  search on metacpan

src/i386-asm.c  view on Meta::CPAN

{
    const ASMInstr *pa;
    int i, modrm_index, reg, v, op1, seg_prefix, pc;
    int nb_ops, s;
    Operand ops[MAX_OPERANDS], *pop;
    int op_type[3]; /* decoded op type */
    int alltypes;   /* OR of all operand types */
    int autosize;

    /* force synthetic ';' after prefix instruction, so we can handle */
    /* one-line things like "rep stosb" instead of only "rep\nstosb" */

 view all matches for this distribution


Alien-Web-ExtJS-V3

 view release on metacpan or  search on metacpan

share/docs/output/Ext.data.DataProxy.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
*/
Ext.data.JsonP.Ext_data_DataProxy({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.data.DirectProxy","Ext.data.HttpProxy","Ext.data.MemoryProxy","Ext.data.ScriptTagProxy"],"extends":"Ext.util.O...

 view all matches for this distribution


Alien-Web-HalBrowser

 view release on metacpan or  search on metacpan

share/vendor/js/backbone.js  view on Meta::CPAN

    // The default interval to poll for hash changes, if necessary, is
    // twenty times a second.
    interval: 50,

    // Gets the true hash value. Cannot use location.hash directly due to bug
    // in Firefox where location.hash will always be decoded.
    getHash: function(window) {
      var match = (window || this).location.href.match(/#(.*)$/);
      return match ? match[1] : '';
    },

 view all matches for this distribution


Alien-XGBoost

 view release on metacpan or  search on metacpan

xgboost/jvm-packages/xgboost4j/src/main/scala/ml/dmlc/xgboost4j/scala/rabit/handler/RabitWorkerHandler.scala  view on Meta::CPAN

  when(AwaitingCommand) {
    case Event(Tcp.Received(bytes), validator) =>
      bytes.asByteBuffers.foreach { buf => readBuffer.put(buf) }
      if (validator.verify(readBuffer)) {
        Try(decodeCommand(readBuffer)) match {
          case scala.util.Success(decodedCommand) =>
            tracker ! decodedCommand
          case scala.util.Failure(th: java.nio.BufferUnderflowException) =>
            // BufferUnderflowException would occur if the message to print has not arrived yet.
            // Do nothing, wait for next Tcp.Received event
          case scala.util.Failure(th: Throwable) => throw th
        }

xgboost/jvm-packages/xgboost4j/src/main/scala/ml/dmlc/xgboost4j/scala/rabit/handler/RabitWorkerHandler.scala  view on Meta::CPAN

  // RabitWorkerHandler --> RabitTrackerHandler
  sealed trait RabitWorkerRequest
  // RabitWorkerHandler <-- RabitTrackerHandler
  sealed trait RabitWorkerResponse

  // Representations of decoded worker commands.
  abstract class TrackerCommand(val command: String) extends RabitWorkerRequest {
    def rank: Int
    def worldSize: Int
    def jobId: String

 view all matches for this distribution


Alien-cares

 view release on metacpan or  search on metacpan

libcares/ares_process.c  view on Meta::CPAN

            }
          a.type = DNS_QUESTION_TYPE(a.p);
          a.dnsclass = DNS_QUESTION_CLASS(a.p);
          a.p += QFIXEDSZ;

          /* Compare the decoded questions. */
          if (strcasecmp(q.name, a.name) == 0 && q.type == a.type
              && q.dnsclass == a.dnsclass)
            {
              ares_free(a.name);
              break;

 view all matches for this distribution


Alien-catch

 view release on metacpan or  search on metacpan

src/catch.hpp  view on Meta::CPAN

                    break;
                }

                // UTF-8 territory
                // Check if the encoding is valid and if it is not, hex escape bytes.
                // Important: We do not check the exact decoded values for validity, only the encoding format
                // First check that this bytes is a valid lead byte:
                // This means that it is not encoded as 1111 1XXX
                // Or as 10XX XXXX
                if (c <  0xC0 ||
                    c >= 0xF8) {

 view all matches for this distribution


Alien-libsecp256k1

 view release on metacpan or  search on metacpan

libsecp256k1/include/secp256k1_ellswift.h  view on Meta::CPAN

 *
 * Changes w.r.t. the paper:
 * - The u=0, t=0, and u^3+t^2+7=0 conditions result in decoding to the point
 *   at infinity in the paper. Here they are remapped to finite points.
 * - The paper uses an additional encoding bit for the parity of y. Here the
 *   parity of t is used (negating t does not affect the decoded x coordinate,
 *   so this is possible).
 *
 * For mathematical background about the scheme, see the doc/ellswift.md file.
 */

 view all matches for this distribution


Alt-Crypt-RSA-BigInt

 view release on metacpan or  search on metacpan

lib/Crypt/RSA.pm  view on Meta::CPAN

    my $key              = $params{Key}; 

    return $self->error ($key->errstr, \%params, $key) unless $key->check();

    if ($params{Armour} || $params{Armor}) { 
        my $decoded = $self->{pp}->unarmour ($cyphertext) ||
            return $self->error ($self->{pp}->errstr());
        $cyphertext = $$decoded{Content}{Cyphertext}
    }

    my $plaintext;
    my $blocksize = blocksize ( $$self{es}->decryptblock (Key => $key),
                                length($cyphertext)

lib/Crypt/RSA.pm  view on Meta::CPAN

sub verify { 

    my ($self, %params) = @_;

    if ($params{Armour} || $params{Armor}) { 
        my $decoded  = $self->{pp}->unarmour ($params{Signature}) ||
            return $self->error ($self->{pp}->errstr());
        $params{Signature} = $$decoded{Content}{Signature}
    }

    my $verify = $self->{ss}->verify (%params) || 
        return $self->error ($self->{ss}->errstr, $params{Key}, \%params);

 view all matches for this distribution


Amazon-DynamoDB

 view release on metacpan or  search on metacpan

lib/Amazon/DynamoDB/20120810.pm  view on Meta::CPAN

                    if (defined($resp) && defined($resp->code)) {
                        if ($resp->code == 500) {
                            $do_retry = 1;
                            $current_retry++;
                        } elsif ($resp->code == 400) {
                            my $json = $resp->can('decoded_content')
                                ? $resp->decoded_content
                                : $resp->body; # Mojo
                            $r = decode_json($json);
                            if ($r->{__type} =~ /ProvisionedThroughputExceededException$/) {
                                # Need to sleep
                                $do_retry = 1;

 view all matches for this distribution


Amazon-S3-Thin

 view release on metacpan or  search on metacpan

lib/Amazon/S3/Thin/Credentials.pm  view on Meta::CPAN

    my $ua = $args->{ua} // LWP::UserAgent->new;

    # Default to the more secure v2 metadata provider
    if (!$args->{version} or $args->{version} != 1) {
        my $res = $ua->put('http://169.254.169.254/latest/api/token', 'X-aws-ec2-metadata-token-ttl-seconds' => 90);
        croak 'Error retreiving v2 token from metadata provider: ' . $res->decoded_content
            unless $res->is_success;

        $ua->default_header('X-aws-ec2-metadata-token' => $res->decoded_content);
    }

    return _instance_metadata($ua, $args->{role});
}

sub _instance_metadata {
    my ($ua, $role) = @_;

    my $res = $ua->get('http://169.254.169.254/latest/meta-data/iam/security-credentials');
    croak 'Error querying metadata service for roles: ' . $res->decoded_content unless $res->is_success;

    my @roles = split /\n/, $res->decoded_content;
    return unless @roles > 0;

    my $target_role = (defined $role and grep { $role eq $_ } @roles)
        ? $role
        : $roles[0];

    my $cred = $ua->get('http://169.254.169.254/latest/meta-data/iam/security-credentials/' . $target_role);
    croak 'Error querying metadata service for credentials: ' . $cred->decoded_content unless $cred->is_success;

    my $obj = eval { $JSON->decode($cred->decoded_content) };
    croak "Invalid data returned from metadata service: $@" if $@;

    return __PACKAGE__->new($obj->{AccessKeyId}, $obj->{SecretAccessKey}, $obj->{Token});
}

lib/Amazon/S3/Thin/Credentials.pm  view on Meta::CPAN

  croak 'The environment variable AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is not set' unless defined $relative_uri;

  my $cred = $ua->get('http://169.254.170.2' . $relative_uri);
  croak 'Error retrieving container credentials' unless $cred->is_success;

  my $obj = eval { $JSON->decode($cred->decoded_content) };
  croak "Invalid data returned: $@" if $@;

  return __PACKAGE__->new($obj->{AccessKeyId}, $obj->{SecretAccessKey}, $obj->{Token});
}

 view all matches for this distribution


Amazon-S3

 view release on metacpan or  search on metacpan

lib/Amazon/S3.pm  view on Meta::CPAN


A human readable error string for the last error encountered.

=head2 error

The decoded XML string as a hash object of the last error.

=head2 last_response

Returns the last L<HTTP::Response> object.

 view all matches for this distribution


Amazon-SES

 view release on metacpan or  search on metacpan

lib/Amazon/SES/Response.pm  view on Meta::CPAN

        return JSON::XS->new->allow_nonref->encode([$self->result]);
    };

=head2 raw_content()

This is the raw (unparsed) by decoded HTTP content as returned from the AWS SES. Usually you do not need it. If you think you need it just knock yourself out!

=cut
        
    method raw_content() {
        return $self->response->decoded_content;
    };

=head2 is_success()

=head2 is_error()

 view all matches for this distribution


Amazon-SQS-Client

 view release on metacpan or  search on metacpan

bin/QueueDaemon.pl  view on Meta::CPAN

your .ini file the default handler will be used. The default hanlder will dump the
message to the log and delete the message.

=item 6. By default messages will only be deleted from the queue if your
handler returns a true value. If you want to delete messages which cannot be
decoded or when you handler returns a non-true value, set the
--delete-when or set 'delete' option in the [error] section of your .ini file.

=item 7. To exit the daemon when your handler returns a non-true value
set the --exit-when option to 'false' or in the [error] section of your .ini
file, set 'exit = false'.

 view all matches for this distribution


Amethyst

 view release on metacpan or  search on metacpan

factpacks/techdict.fact  view on Meta::CPAN

PGA slot => This slot accepts a PGA chip. See PGA.
Pincushioning => This is one form of image distortion on a monitor. Good monitors have controls to deal with this problem. Basically, the top and bottom of the screen are wider than the middle (convex), or vice versa (concave). When corrected properl...
PING => see Packet InterNet Gopher.
PIO => See Programmed Input/Output.
Pipeburst Cache => See Pipeline Burst Cache. This is an abbreviation, or contraction, for it, just like "ain't" is an abbreviation for "am not."
Pipeline => This refers to the technique of processing multiple parts of an instruction at the same time. Many processers have two or more instruction pipelines. Think of it as an automobile assembly line. As one instruction is executed, the next ins...
Pipeline Burst Cache => This is a form of L2 cache that uses pipelining to speed data access by being able to feed data to the CPU at the same time it pulls data from memory. The burst mode also allows the cache to fetch additional data from main mem...
Pixel => The smallest dot that a computer can display at a particular resolution. Screen size is often referred to in pixels: 800 x 600, for example. This means that the screen is 800 pixels across and 600 pixels vertically.
Platform => This is a means of generically grouping like computers. Macintosh computers are a platform; so are PCs running DOS. It's not very specific, and multi-platform support can mean many things. If someone says to you "this application supports...
PNP => (Plug and Play) This is a standard that was supposed to make adding peripherals to your system as easy as plugging them in and using them. Its biggest contribution, aside from headaches, is the removal of jumpers from many devices.
Point to Point Tunneling Protocol => (PPTP) This is a remote access protocol that allows people to make a connection to easily connect to their local network through the Internet or some other large network. Conversations are kept private through enc...

 view all matches for this distribution


Amon2-Auth-Site-Google

 view release on metacpan or  search on metacpan

lib/Amon2/Auth/Site/Google.pm  view on Meta::CPAN

        code          => $c->req->param('code'),
        redirect_uri  => $self->redirect_url,
        grant_type    => 'authorization_code',
    });
    $res->is_success or do {
        warn $res->decoded_content;
        return $callback->{on_error}->($res->decoded_content);
    };
    my $token = decode_json $res->content;

    my $uri = URI->new($self->token_info_url);
    $uri->query_form(+{ access_token => $token->{access_token} });
    $res = $self->ua->get($uri->as_string);
    my $token_info = decode_json $res->content;
    $res->is_success or do {
        warn $res->decoded_content;
        return $callback->{on_error}->($res->decoded_content);
    };
    $token_info->{audience} eq $self->client_id or do {
        warn 'invalid token';
        return $callback->{on_error}->('invalid token');
    };

lib/Amon2/Auth/Site/Google.pm  view on Meta::CPAN

    if ($self->user_info) {
        my $uri = URI->new($self->user_info_url);
        $uri->query_form(+{ access_token => $token->{access_token} });
        my $res = $self->ua->get($uri->as_string);
        $res->is_success or do {
            warn $res->decoded_content;
            return $callback->{on_error}->($res->decoded_content);
        };
        my $user = decode_json $res->content;
        push @args, $user;
    }

 view all matches for this distribution


Amon2-Auth-Site-Hatena

 view release on metacpan or  search on metacpan

lib/Amon2/Auth/Site/Hatena.pm  view on Meta::CPAN


    if ($self->user_info) {
        my $res = $self->ua->get($self->user_info_url);
        return $error->($self->ua->errstr) if $res->is_error;

        my $data = decode_json($res->decoded_content);
        push @args, $data;
    }

    $callback->{on_finished}->(@args);
}

 view all matches for this distribution


Amon2-Auth-Site-Instagram

 view release on metacpan or  search on metacpan

lib/Amon2/Auth/Site/Instagram.pm  view on Meta::CPAN

        grant_type    => 'authorization_code',
        redirect_uri  => $self->redirect_url,
        code          => $c->req->param('code'),
    });
    $res->is_success or do {
        warn $res->decoded_content;
        return $callback->{on_error}->($res->decoded_content);
    };

    $res = decode_json $res->content;

    my @args = ($res->{access_token});

 view all matches for this distribution


Amon2-Auth-Site-LINE

 view release on metacpan or  search on metacpan

lib/Amon2/Auth/Site/LINE.pm  view on Meta::CPAN

            redirect_uri  => $redirect_uri,
            client_id     => $self->client_id,
            client_secret => $self->client_secret,
        });
        unless ($res->is_success) {
            warn $res->decoded_content;
            return $callback->{on_error}->($res->status_line);
        }

        $token_data = decode_json($res->content);
        %api_response = (%api_response, %$token_data);

lib/Amon2/Auth/Site/LINE.pm  view on Meta::CPAN

        my $uri = URI->new($self->verify_url);
        $uri->query_form(access_token => $token_data->{access_token});

        my $res = $self->ua->get($uri->as_string);
        unless ($res->is_success) {
            warn $res->decoded_content;
            return $callback->{on_error}->($res->status_line);
        }

        $verify_data = decode_json($res->content);
        if ($verify_data->{client_id} ne $self->client_id) {

lib/Amon2/Auth/Site/LINE.pm  view on Meta::CPAN

        my $res = $self->ua->get(
            $uri->as_string,
            Authorization => 'Bearer ' . $token_data->{access_token},
        );
        $res->is_success or do {
            warn $res->decoded_content;
            return $callback->{on_error}->($res->decoded_content);
        };
        my $user = decode_json($res->content);
        %api_response = (%api_response, %$user);
    }
    push @args, \%api_response;

 view all matches for this distribution


Amon2-Auth

 view release on metacpan or  search on metacpan

lib/Amon2/Auth/Site/Facebook.pm  view on Meta::CPAN

	$params{redirect_uri} =~ s/\?.+//;
	$params{code} = $c->req->param('code') or die;
	$uri->query_form(%params);
	my $res = $self->ua->get($uri->as_string);
	$res->is_success or do {
		warn $res->decoded_content;
		return $callback->{on_error}->($res->decoded_content);
	};
    my $dat = decode_json($res->decoded_content);
	if (my $err = $dat->{error}) {
		return $callback->{on_error}->($err);
	}
    my $access_token = $dat->{access_token} or die "Cannot get a access_token";
    my @args = ($access_token);
    if ($self->user_info) {
        my $res = $self->ua->get("https://graph.facebook.com/me?fields=@{[$self->fields]}&access_token=${access_token}");
        $res->is_success or return $callback->{on_error}->($res->status_line);
        my $dat = decode_json($res->decoded_content);
        push @args, $dat;
    }
	return $callback->{on_finished}->(@args);
}

 view all matches for this distribution


Amon2

 view release on metacpan or  search on metacpan

author/assets.pl  view on Meta::CPAN

        use strict;

        my $res = $ua->get($url);
        $res->is_success or die "Cannot fetch $url: " . $res->status_line;

        my $content = $res->decoded_content;
        open my $fh, '>:utf8', "lib/Amon2/Setup/Asset/${name}.pm";
        print {$fh} $xslate->render_string(<<'...', +{ file => $0, basename => basename($url), name => $name, data => Dumper({ 'js/' . basename($url) => $content})});
# This file is generated by <% file %>. Do not edit manually.
package Amon2::Setup::Asset::<% name %>;
use strict;

author/assets.pl  view on Meta::CPAN

sub run_jquery {
    my $url = 'http://code.jquery.com/jquery-3.6.1.min.js';
    my $res = $ua->get($url);
    $res->is_success or die "Cannot fetch $url: " . $res->status_line;

    my $jquery = $res->decoded_content;
    open my $fh, '>:utf8', 'lib/Amon2/Setup/Asset/jQuery.pm';
    print {$fh} $xslate->render_string(<<'...', +{ file => $0, basename => basename($url), data => Dumper({ 'js/' . basename($url) => $jquery})});
# This file is generated by <% file %>. Do not edit manually.
package Amon2::Setup::Asset::jQuery;
use strict;

author/assets.pl  view on Meta::CPAN


sub fetch {
    my $url = shift;
    my $res = $ua->get($url);
    $res->is_success or die "Cannot fetch $url: " . $res->status_line;
    return $res->decoded_content;
}

sub run_bootstrap {
    my $files = {};
    print "Fetching bootstrap\n";

 view all matches for this distribution


AnyEvent-APNS

 view release on metacpan or  search on metacpan

lib/AnyEvent/APNS.pm  view on Meta::CPAN


C<$device_token> should be a binary 32bytes device token provided by iPhone SDK (3.0 or above)

C<\%payload> should be a hashref suitable to apple document: L<http://developer.apple.com/iPhone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html>

Note: If you involve multi-byte strings in C<\%payload>, it should be utf8 decoded strings not utf8 bytes.

Store C<$identifier> with your C<$device_token> to react to C<on_error_response>.

=head2 $apns->handler

 view all matches for this distribution


AnyEvent-Beanstalk

 view release on metacpan or  search on metacpan

lib/AnyEvent/Beanstalk.pm  view on Meta::CPAN


=item B<decoder ([$decoder])>

Set/get the serialization decoder. C<$decoder> is a reference to a
subroutine that will be called when data from the beanstalkd server needs to be
decoded. The subroutine will be passed the data fetched from the beanstalkd
server and should return the value the application can use. The default is
to decode using YAML.

=item B<debug ([$debug])>

 view all matches for this distribution


AnyEvent-CouchDB

 view release on metacpan or  search on metacpan

lib/AnyEvent/CouchDB.pm  view on Meta::CPAN

  $status ||= 200;
  $json   ||= $default_json;
  my $cv = AE::cv;
  AE::now_update();

  # default success handler sends back decoded json response
  my $success = sub {
    my ($resp) = @_;
    $options->{success}->(@_) if ($options->{success});
    $cv->send($resp);
  };

 view all matches for this distribution


AnyEvent-Discord-Client

 view release on metacpan or  search on metacpan

lib/AnyEvent/Discord/Client.pm  view on Meta::CPAN


  if (!$resp->is_success) {
    return undef;
  }
  if ($resp->header("Content-Type") eq 'application/json') {
    return JSON::decode_json($resp->decoded_content);
  } else {
    return 1;
  }
}

lib/AnyEvent/Discord/Client.pm  view on Meta::CPAN

      },
    );

=item C<api(I<$method>, I<$path>, I<$data>, I<$cb>)>

Invokes the Discord API asynchronously and returns immediately.  C<$method> is the HTTP method to use; C<$path> is the endpoint to call.  If C<$data> is a reference, it is sent as JSON; otherwise, if it is defined, it is sent as a C<x-www-form-urlenc...

=item C<api_sync(I<$method>, I<$path>, I<$data>)>

Invokes the Discord API synchronously and returns the result of the call.  C<$method> is the HTTP method to use; C<$path> is the endpoint to call.  If C<$data> is a reference, it is sent as JSON; otherwise, if it is defined, it is sent as a C<x-www-f...

=item C<websocket_send(I<$op>, I<$d>)>

Sends a raw WebSocket payload as per the L<Discord Gateway|https://discordapp.com/developers/docs/topics/gateway> documentation.

 view all matches for this distribution


AnyEvent-Discord

 view release on metacpan or  search on metacpan

lib/AnyEvent/Discord.pm  view on Meta::CPAN

    $self->_trace('api req: ' . $request->as_string());
    my $res = $self->_ua->request($request);
    $self->_trace('api res: ' . $res->as_string());
    if ($res->is_success()) {
      if ($res->header('Content-Type') eq 'application/json') {
        return decode_json($res->decoded_content());
      } else {
        return $res->decoded_content();
      }
    }
    return;
  }

 view all matches for this distribution


AnyEvent-HTTP-MXHR

 view release on metacpan or  search on metacpan

t/001_basic.t  view on Meta::CPAN

                my ($body, $headers) = @_;

                if ($headers->{'content-type'} =~ /^application\/json/) {
                    ok(1, "json received");
                    my $json = eval { decode_json $body };
                    ok ($json, "JSON decoded OK");
                    ok ($json->{seq} <= $seq, "seq ok $seq");
                    if ($seq == $json->{seq}) { $seq++ } # see above XXX
                } else {
                    ok(0, "unknown content-type: $headers->{'content-type'}");
                    ok(0, "don't know how to handle data");

 view all matches for this distribution


AnyEvent-HTTP-Message

 view release on metacpan or  search on metacpan

lib/AnyEvent/HTTP/Response.pm  view on Meta::CPAN



sub from_http_message {
  my ($self, $res) = @_;
  my $args = {
    body => $res->${\ ($res->can('decoded_content') || 'content') },
    pseudo_headers => {
      Status => $res->code,
      Reason => $res->message,
    },
    headers => $self->_hash_http_headers($res->headers),

 view all matches for this distribution


AnyEvent-IRC

 view release on metacpan or  search on metacpan

lib/AnyEvent/IRC/Client.pm  view on Meta::CPAN


This module also implements the ISUPPORT (command 005) extension of the IRC protocol
(see http://www.irc.org/tech_docs/005.html) and will enable the NAMESX and UHNAMES
extensions when supported by the server.

Also CTCP support is implemented, all CTCP messages will be decoded and events
for them will be generated. You can configure auto-replies to certain CTCP commands
with the C<ctcp_auto_reply> method, or you can generate the replies yourself.

=head2 A NOTE TO CASE MANAGEMENT

 view all matches for this distribution


AnyEvent

 view release on metacpan or  search on metacpan

lib/AnyEvent/DNS.pm  view on Meta::CPAN


Note that, since changing the decoder or encoder might break existing
code, you should either be sure to control for this, or only temporarily
change these values, e.g. like so:

   my $decoded = do {
      local $AnyEvent::DNS::opcode_str{7} = "yxrrset";
      AnyEvent::DNS::dns_unpack $mypkt
   };

=over 4

lib/AnyEvent/DNS.pm  view on Meta::CPAN

Same as above, but for resource record type names/values.

=item %AnyEvent::DNS::dec_rr

This hash maps resource record type values to code references. When
decoding, they are called with C<$_> set to the undecoded data portion and
C<$ofs> being the current byte offset. of the record. You should have a
look at the existing implementations to understand how it works in detail,
but here are two examples:

Decode an A record. A records are simply four bytes with one byte per

lib/AnyEvent/DNS.pm  view on Meta::CPAN

response. It handles timeouts, retries and automatically falls back to
virtual circuit mode (TCP) when it receives a truncated reply. It does not
handle anything else, such as the domain searchlist or relative names -
use C<< ->resolve >> for that.

Calls the callback with the decoded response packet if a reply was
received, or no arguments in case none of the servers answered.

=cut

sub request($$) {

lib/AnyEvent/DNS.pm  view on Meta::CPAN

seconds. For C<a> records, this will be the textual IPv4 addresses, for
C<ns> or C<cname> records this will be a domain name, for C<txt> records
these are all the strings and so on.

All types mentioned in RFC 1035, C<aaaa>, C<srv>, C<naptr> and C<spf> are
decoded. All resource records not known to this module will have the raw
C<rdata> field as fifth array element.

Note that this resolver is just a stub resolver: it requires a name server
supporting recursive queries, will not do any recursive queries itself and
is not secure when used against an untrusted name server.

 view all matches for this distribution


( run in 1.241 second using v1.01-cache-2.11-cpan-26ccb49234f )