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


Audio-Opusfile

 view release on metacpan or  search on metacpan

lib/Audio/Opusfile.pm  view on Meta::CPAN

in the first logical Opus stream.

=item $of->B<bitrate_instant>

Compute the instantaneous bitrate, measured as the ratio of bits to
playable samples decoded since a) the last call to B<bitrate_instant>,
b) the last seek, or c) the start of playback, whichever was most
recent.

This will spike somewhat after a seek or at the start/end of a chain
boundary, as pre-skip, pre-roll, and end-trimming causes samples to be
decoded but not played.

=item $of->B<raw_tell>

Obtain the current value of the position indicator of I<$of>. This is
the byte position that is currently being read from.

lib/Audio/Opusfile.pm  view on Meta::CPAN

exactly the requested position. The PCM offset is in samples at 48 kHz
relative to the start of the stream.

=item $of->B<set_gain_offset>(I<$gain_type>, I<$gain_offset>)

Sets the gain to be used for decoded output.

By default, the gain in the header is applied with no additional
offset. The total gain (including header gain and/or track gain, if
applicable, and this offset), will be clamped to [-32768,32767]/256
dB. This is more than enough to saturate or underflow 16-bit PCM.

B<Note:> The new gain will not be applied to any already buffered,
decoded output. This means you cannot change it sample-by-sample, as
at best it will be updated packet-by-packet. It is meant for setting a
target volume level, rather than applying smooth fades, etc.

I<$gain_type> is one of OP_HEADER_GAIN, OP_TRACK_GAIN, or
OP_ABSOLUTE_GAIN. I<$gain_offset> is in 1/256ths of a dB.

lib/Audio/Opusfile.pm  view on Meta::CPAN

It is recommended to use B<read_float> instead of this method if the
rest of your audio processing chain can handle floating point.

Reads more samples from the stream. I<$bufsize> is the maximum number
of samples read, and it defaults to 1048576. Returns a list whose
first element is the link index this data was decoded from, and the
rest of the elements are PCM samples, as signed 16-bit values at 48
kHz with a nominal range of [-32768,32767). Multiple channels are
interleaved using the L<Vorbis channel ordering|https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810004.3.9>.

You can use C<< $of->head($li)->channel_count >> to find out the

 view all matches for this distribution


Audio-Play-MPG123

 view release on metacpan or  search on metacpan

mpg123/INSTALL  view on Meta::CPAN


Some additional remarks:

 - There is currently no direct audio hardware support for some
   hardware and (of course) "generic" targets.  That means that you 
   have to use the "-s" commandline option to write the decoded audio 
   data to stdout.

 - On Solaris, use Sun's SparcWorks compiler ("make solaris")
   if at all possible.  It generates faster code than gcc, so
   use gcc only if there's no other way.

 view all matches for this distribution


Audio-RaveMP

 view release on metacpan or  search on metacpan

ravemp.c  view on Meta::CPAN

	    j = sscanf(p,"%u",&arg);

	if (j < 1)
	    break;

	/* Get argument pointer (if any) and return decoded value */

	if ((ip=va_arg(ap,unsigned int *)) != NULL)
	    *ip = arg;

	/* Skip field just processed and white space following it */

ravemp.c  view on Meta::CPAN


	while (isblank(*p))
	    p++;
    }

    return i;	/* Return number of fields decoded */
}
/********************** XPV *****************************/
static void XPV(int level,char *fmt,...)
{
    /* To be implemented... */

 view all matches for this distribution


Audio-Scan

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

          the file metadata which may or may not be correct.
        - Bundled a win32 build of zlib to make compiling on Windows a bit easier.

0.62    2010-03-02 12:00:00
        - INCOMPATIBLE CHANGE: Ogg Vorbis COVERART tags are now translated to an
          ALLPICTURES block and are base64-decoded.
        - Added support for new Ogg Vorbis cover art tag, METADATA_BLOCK_PICTURE. Data
          is returned in the same ALLPICTURES array as for FLAC.

0.61    2010-02-23 22:50:00
        - RT 53118: Fixed crash under Perl 5.11.

 view all matches for this distribution


Audio-TinySoundFont

 view release on metacpan or  search on metacpan

TinySoundFont/tsf.h  view on Meta::CPAN

		if (pSmpl >= pSmplEnd) break;
		{ int use = stb_vorbis_decode_frame_pushdata(v, pSmpl, (int)(pSmplEnd - pSmpl), TSF_NULL, &outputs, &n_samples); pSmpl += use; }
		if (!n_samples) continue;
		#endif

		// Expand our output buffer if necessary then copy over the decoded frame samples
		resNum += n_samples;
		if (resNum > resMax)
		{
			do { resMax += (resMax ? (resMax < 1048576 ? resMax : 1048576) : resInitial); } while (resNum > resMax);
			res = (float*)TSF_REALLOC((oldres = res), resMax * sizeof(float));

 view all matches for this distribution


Audio-WMA

 view release on metacpan or  search on metacpan

WMA.pm  view on Meta::CPAN

    # Error Correction Data        BYTESTREAM   variable        error-correction-specific format data, depending on 
    #                                 value of Error Correct Type
    #
    # There is one ASF_Stream_Properties_Object for each stream (audio, video) but the
    # stream number isn't known until halfway through decoding the structure, hence it
    # it is decoded to a temporary variable and then stuck in the appropriate index later
    my $method = $inline ? '_readAndIncrementInlineOffset' : '_readAndIncrementOffset';

    $stream{'stream_type'}        = $self->$method($GUID);
    $stream{'stream_type_guid'}   = _byteStringToGUID($stream{'stream_type'});
    $stream{'error_correct_type'} = $self->$method($GUID);

 view all matches for this distribution


Audio-XMMSClient

 view release on metacpan or  search on metacpan

XMMSClientResult.xs  view on Meta::CPAN


=over 4

=item Arguments: $string

=item Return Value: $decoded_url

=back

  my $decoded_url = $result->decode_url($url);
  my $decoded_url = Audio::XMMSClient::Result->decode_url($url);

Decode an URL-encoded C<$string>.

Some strings (currently only the url of media) has no known encoding, and must
be encoded in an UTF-8 clean way. This is done similar to the url encoding web
browsers do. This functions decodes a string encoded in that way. OBSERVE that
the decoded string HAS NO KNOWN ENCODING and you cannot display it on screen in
a 100% guaranteed correct way (a good heuristic is to try to validate the
decoded string as UTF-8, and if it validates assume that it is an UTF-8 encoded
string, and otherwise fall back to some other encoding).

Do not use this function if you don't understand the implications. The best
thing is not to try to display the url at all.

 view all matches for this distribution


Audio-aKodePlayer

 view release on metacpan or  search on metacpan

lib/Audio/aKodePlayer.pm  view on Meta::CPAN

Closes the player and releases the output sink.

=item load(filename)

Loads the file from a given filename and prepares it for
playing. Returns false if the file cannot be loaded or decoded.

=item setDecoderPlugin(plugin_name)

Sets the decoder plugin to use. Default is auto-detect.

 view all matches for this distribution


Aut

 view release on metacpan or  search on metacpan

Aut/Ticket.pm  view on Meta::CPAN


=head3 C<decrypt(ciphertext) --E<gt> string>

=over 1

Decrypts text using L<Aut::Crypt>, after it has been decoded
with L<Aut::Base64>. If the decryption is valid, it returns
the decrypted string, otherwise C<undef> is returned.

=head1 SEE ALSO

 view all matches for this distribution


Auth-Yubikey_Decrypter

 view release on metacpan or  search on metacpan

lib/Auth/Yubikey_Decrypter.pm  view on Meta::CPAN

        my $token_bin = &yubikey_modhex_decode($token);

        # Decrypt the token using it's key

        my $cipher = Crypt::Rijndael->new( $aeskey_bin );
        my $token_decoded_bin = $cipher->decrypt($token_bin);

        my $token_decoded_hex = unpack "H*", $token_decoded_bin;

        # get all the values from the decoded token
        my $secretid_hex        = substr($token_decoded_hex,0,12);
        my $counter_dec         = ord(substr($token_decoded_bin,7,1))*256+ord(substr($token_decoded_bin,6,1));
        my $timestamp_dec       = ord(substr($token_decoded_bin,10,1))*65536+ord(substr($token_decoded_bin,9,1))*256+ord(substr($token_decoded_bin,8,1));
        my $session_use_dec     = ord(substr($token_decoded_bin,11,1));
        my $random_dec          = ord(substr($token_decoded_bin,13,1))*256+ord(substr($token_decoded_bin,12,1));
        my $crc_dec             = ord(substr($token_decoded_bin,15,1))*256+ord(substr($token_decoded_bin,14,1));
        my $crc_ok              = &yubikey_crc_check($token_decoded_bin);

        return ($publicID,$secretid_hex,$counter_dec,$timestamp_dec,$session_use_dec,$random_dec,$crc_dec,$crc_ok);
}

=head2 yubikey_modhex_decode

Input : the modhex code
Output : decoded modhex code in hex

=cut

sub yubikey_modhex_decode
{
        my $mstring = $_[0];
        my $cset="cbdefghijklnrtuv";
        my $decoded="";
        my $hbyte=0;
        my $pos;
        for (my $i=0; $i<length($mstring);$i++)
        {
                $pos=index($cset,substr($mstring,$i,1));
                if ($i/2 != int($i/2))
                {
                        $decoded .= chr($hbyte+$pos);
                        $hbyte=0;
                }
                else
                {
                        $hbyte=$pos*16;
                }
        }
        return $decoded;
}

=head2 yubikey_crc_check

Performs a crc check on the decoded data

=cut

sub yubikey_crc_check
{

 view all matches for this distribution


Authen-CAS-External

 view release on metacpan or  search on metacpan

lib/Authen/CAS/External/UserAgent.pm  view on Meta::CPAN

		# The previous response can determine what occurred
		return;
	}

	# Parse the forms on the page
	my @forms = HTML::Form->parse($response->decoded_content, $response->base);

	# Find the login form
	my $login_form;
	FORM: foreach my $form (@forms) {
		if (defined $form->find_input('lt')

 view all matches for this distribution


Authen-CAS-UserAgent

 view release on metacpan or  search on metacpan

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

# default heuristic for finding login parameters
my $defaultLoginParamsHeuristic = sub {
	my ($service, $response, $ua, $h, @params) = @_;

	# find all input controls on the submit form
	my $content = $response->decoded_content;
	while($content =~ /(\<input.*?\>)/igs) {
		my $input = $1;
		my $name = $input =~ /name=\"(.*?)\"/si ? $1 : undef;
		my $value = $input =~ /value=\"(.*?)\"/si ? $1 : undef;

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

			return $1;
		}
	}

	#check for a javascript window.location.href redirect
	if($response->decoded_content =~ /window\.location\.href="[^"]*ticket=([^&"]*?)"/sg) {
		return $1;
	}

	return;
};

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

		'targetService' => $service,
	);

	# fetch proxy ticket and parse response xml
	my $response = $ua->simple_request(HTTP::Request::Common::GET($ptUri));
	my $doc = eval {XML::LibXML->new()->parse_string($response->decoded_content('charset' => 'none'))};
	if($@ || !$doc) {
		$h->{'error'} = ERROR_PROXY_INVALIDRESPONSE;
		push @{$h->{'errors'}}, $h->{'error'};
		return;
	}

lib/Authen/CAS/UserAgent.pm  view on Meta::CPAN

	#retrieve a ticket for the requested service
	my $ticketResponse = $ua->simple_request(HTTP::Request::Common::POST($tgtUri, [
		'service' => $service,
	]));
	return if($ticketResponse->code != 200);
	return $ticketResponse->decoded_content;
};

##Static Methods

#return the default user agent for this class

 view all matches for this distribution


Authen-Passphrase-Argon2

 view release on metacpan or  search on metacpan

lib/Authen/Passphrase/Argon2.pm  view on Meta::CPAN


params

	# Only one of these must be defined for the salt value. An error will be thrown if none or more than one is defined.
	salt - plain text salt value
	salt_hex - salt in hex value that gets decoded.
	salt_base64 - salt value encoded in base64 that gets decoded.
	salt_random - a random salt will be generated using Data::GUID.

	# Only one of these must be defined for the crypt value. An error will be thrown if none or more than one is defined.
	passphrase - plain text passpord that will be converted to argon2
	hash - plain text argon2 value

 view all matches for this distribution


Authen-Radius

 view release on metacpan or  search on metacpan

Radius.pm  view on Meta::CPAN

sub _decode_value {
    my ( $self, $vendor, $id, $type, $name, $value, $has_tag ) = @_;

    if ( defined $type ) {
        if ( exists $decoder{$type} ) {
            my ($decoded, $tag) = $decoder{$type}->( $self, $vendor, $id, $name, $value, $has_tag );
            return wantarray ? ($decoded, $tag) : $decoded;
        }
        else {
            if ($debug) {
                print {*STDERR} "Unsupported type '$type' for attribute with id: '$id'.\n";
            }

 view all matches for this distribution


Authen-SASL-Perl-NTLM

 view release on metacpan or  search on metacpan

lib/Authen/SASL/Perl/NTLM.pm  view on Meta::CPAN

#
sub client_step {
    my ( $self, $challenge ) = @_;

    if ( defined $challenge ) {
        # The challenge has been decoded but Authen::NTLM expects it encoded
        $challenge = MIME::Base64::encode_base64($challenge);

        # Empty challenge string needs to be undef if we want
        # Authen::NTLM::challenge() to generate a type 1 message
        $challenge = undef if $challenge eq q{};

 view all matches for this distribution


Authen-Simple-WebForm

 view release on metacpan or  search on metacpan

lib/Authen/Simple/WebForm.pm  view on Meta::CPAN

        if ($self->trace)
        {
            print STDERR ("-"x80)."\n";
            print STDERR "TRACE: initial response, response code [".$res->code."]\n";
            print STDERR "TRACE: initial response, cookies [".$ua->cookie_jar->as_string()."]\n";
            print STDERR $res->decoded_content;
            print STDERR "\n\n\n";
            print STDERR ("-"x80)."\n";
        }
        # make sure status code is ok?
        if ($self->check_initial_status_code)

lib/Authen/Simple/WebForm.pm  view on Meta::CPAN

        {
            my $expect = $self->initial_expect;
            unless (ref($expect) eq 'Regexp') {
                $expect = qr/\Q$expect\E/;
            }
            unless ($res->decoded_content =~ /$expect/)
            {
                $self->log->error("Initial url didn't return expected results.") if $self->log;
                return 0;
            }
        }

lib/Authen/Simple/WebForm.pm  view on Meta::CPAN

    if ($self->trace)
    {
        print STDERR ("-"x80)."\n";
        print STDERR "TRACE: initial response, response code [".$res->code."]\n";
        print STDERR "TRACE: initial response, cookies [".$ua->cookie_jar->as_string()."]\n";
        print STDERR $res->decoded_content;
        print STDERR "\n\n\n";
        print STDERR ("-"x80)."\n";
    }

    # make sure status code is ok?

lib/Authen/Simple/WebForm.pm  view on Meta::CPAN

    {
        my $expect = $self->login_expect;
        unless (ref($expect) eq 'Regexp') {
            $expect = qr/\Q$expect\E/;
        }
        unless ($res->decoded_content =~ /$expect/)
        {
            $self->log->debug("Failed to authenticate user '$full_username'. Reason: Login page response did not match expected value.")
                if $self->log;
            return 0;
        }

 view all matches for this distribution


Authen-Ticket

 view release on metacpan or  search on metacpan

lib/Authen/Ticket/Client.pm  view on Meta::CPAN


=over 4

=item decode_cookie($class, $ticket)

This subroutine returns the decoded version of the ticket.  This is the
place to put decryption of the cookie or other checks that do not
depend on understanding the information within the ticket.  The default
version decodes from base 64.  The return value is the decoded
string representation of the ticket.

=item deconstruct_cookie($class, $ticket)

This subroutine breaks the ticket apart into field values.  The return

 view all matches for this distribution


Authen-WebAuthn

 view release on metacpan or  search on metacpan

lib/Authen/WebAuthn.pm  view on Meta::CPAN

    };
}

sub getAttestationObject {
    my ($dat)   = @_;
    my $decoded = decode_base64url($dat);
    my $res     = {};
    my $h       = decode_cbor($decoded);
    $res->{authData}    = getAuthData( $h->{authData} );
    $res->{authDataRaw} = $h->{authData};
    $res->{attStmt}     = $h->{attStmt};
    $res->{fmt}         = $h->{fmt};
    return $res;

 view all matches for this distribution


Avro

 view release on metacpan or  search on metacpan

t/03_bin_decode.t  view on Meta::CPAN

        my $dec = Avro::BinaryDecoder->decode(
            writer_schema => $w_enum,
            reader_schema => $r_enum,
            reader        => $reader,
        );
        is $dec, $data, "decoded!";
    }

    for my $data (qw/a z/) {
        Avro::BinaryEncoder->encode(
            schema  => $w_enum,

t/03_bin_decode.t  view on Meta::CPAN

        writer_schema => $w_schema,
        reader_schema => $r_schema,
        reader        => $reader,
    );

    is_deeply $dec, $data, "decoded!";
}

## map resolution
{
    my $w_schema = Avro::Schema->parse(<<EOP);

t/03_bin_decode.t  view on Meta::CPAN

    my $dec = Avro::BinaryDecoder->decode(
        writer_schema => $w_schema,
        reader_schema => $w_schema,
        reader        => $reader,
    );
    is_deeply $dec, $data, "decoded succeeded!";
}

## schema upgrade
{
    my $w_schema = Avro::Schema->parse(<<EOP);

t/03_bin_decode.t  view on Meta::CPAN

    my $dec = Avro::BinaryDecoder->decode(
        writer_schema => $w_schema,
        reader_schema => $w_schema,
        reader        => $reader,
    );
    is_deeply $dec, $data, "decoded succeeded! +upgrade";
    is $dec->{one}[0], 1.0, "kind of dumb test";
}

done_testing;

 view all matches for this distribution


AxKit-XSP-WebUtils

 view release on metacpan or  search on metacpan

WebUtils.pm  view on Meta::CPAN

Returns the name of the authenticated user.

=head2 C<<web:password/>>

If the current request is protected by Basic authentication, this tag
will return the decoded password sent by the client.

=head2 C<<web:request_parsed_uri>>

This tag allows you to get the fully parsed URI for the current request.
In contrast to <web:request_uri/> the parsed URI will always include things like

 view all matches for this distribution


AxKit2

 view release on metacpan or  search on metacpan

demo/webmail/xmlmail-display.xsl  view on Meta::CPAN

        <xsl:apply-templates/>
    </div>
</xsl:template>

<xsl:template match="htmlpart[@pre='1']">
    <!-- <div class="marker">HTML Part (decoded to text):</div> -->
    <pre>
    <xsl:apply-templates/>
    </pre>
</xsl:template>

<xsl:template match="htmlpart">
    <!-- <div class="marker">HTML Part (decoded to text):</div> -->
    <xsl:apply-templates/>
</xsl:template>

<xsl:template match="textpart">
    <!-- <div class="marker">Plain Text Part:</div> -->

 view all matches for this distribution


BBCode-Parser

 view release on metacpan or  search on metacpan

lib/BBCode/Util.pm  view on Meta::CPAN

	} elsif(/^ (\d+) $/x) {
		$ch = 0+$1;
	}
	return sprintf "#x%X", $ch if defined $ch;

	my $decoded = HTML::Entities::decode("&$_;");
	return undef if $decoded eq "&$_;";
	return $_;
}

BEGIN { _export qw(parseListType parse) }
my %listtype = (

 view all matches for this distribution


BBDB

 view release on metacpan or  search on metacpan

BBDB.pm  view on Meta::CPAN

  (birthday "6/15")
 )
 nil                                  The cache vector - always nil
 ]

After this is decoded it will be returned as a reference to a BBDB
object.  The internal structure of the BBDB object mimics the lisp
structure of the BBDB string.  It consists of a reference to an array
with 9 elements The Data::Dumper output of the above BBDB string would
just replaces all of the ()s with []s.  It can be accessed by using
the C<$bbdb->part('all')> method. For completeness, here is the output

BBDB.pm  view on Meta::CPAN

In version 2.32 of BBDB, despite what the documentation says, it seems
that zip codes are always stored quoted strings, even though it seems
to be impossible to enter anything other than an integer.  

Phone numbers may be converted from strings to integers if they are
decoded and encoded.  This should not affect the operation of BBDB.
Also a null last name is converted from "" to nil, which also doesn't
hurt anything.

You might ask why I use arrays instead of hashes to encode the data in
the BBDB file.  The answer is that order matters in the bbdb file, and

 view all matches for this distribution


BBS-DiscuzX2

 view release on metacpan or  search on metacpan

lib/BBS/DiscuzX2.pm  view on Meta::CPAN

    $self->{site}  = $opt{site};

    $res = $self->{browser}->get($opt{site}.'forum.php');
    return unless($res->is_success);

    ($self->{formhash}) = $res->decoded_content =~ m/formhash=(\w+)">/s;
    return 1;
}

sub post_thread {
    my ($self, $data) = @_;

 view all matches for this distribution


BBS-Perm

 view release on metacpan or  search on metacpan

lib/BBS/Perm/Plugin/Feed.pm  view on Meta::CPAN

=item text

Get the contents of user's input, it's either a command's output or a file's
contents.

Caveat: command output and file contents are decoded by your system LANG or
LC_ALL setting. So, you'd better update the encoding of your file in 
accordance with your system settings.

=item widget

 view all matches for this distribution


BERT

 view release on metacpan or  search on metacpan

t/02-perl.t  view on Meta::CPAN

          [
              131, 104, 3, 100, 0, 4, 98, 101, 114, 116, 100, 0, 4, 100, 105, 99, 116, 
              108, 0, 0, 0, 1, 104, 2, 109, 0, 0, 0, 2, 111, 115, 109, 0, 0, 0, 5, 108, 
              105, 110, 117, 120, 106
          ], 'hash encode');
my $decoded = decode_bert($bert);
isa_ok($decoded, 'BERT::Dict');
is_deeply($decoded, BERT::Dict->new([ os => 'linux' ]), 'hash decode');
my %decoded = @{ $decoded->value };
is_deeply(\%decoded, $perl, 'hash decode');

# ordered hash
SKIP: {
    eval { require Tie::IxHash };
    skip 'Tie::IxHash not install', 4 if $@;

t/02-perl.t  view on Meta::CPAN

                  131, 104, 3, 100, 0, 4, 98, 101, 114, 116, 100, 0, 4, 100, 105, 99, 116,
                  108, 0, 0, 0, 2, 104, 2, 109, 0, 0, 0, 5, 102, 110, 97, 109, 101, 109, 0,
                  0, 0, 4, 74, 117, 97, 110, 104, 2, 109, 0, 0, 0, 5, 108, 110, 97, 109,
                  101, 109, 0, 0, 0, 5, 84, 97, 109, 97, 100, 106
              ], 'ordered hash encode');
    my $decoded = decode_bert($bert);
    isa_ok($decoded, 'BERT::Dict');
    is_deeply($decoded, BERT::Dict->new([ fname => 'Juan', lname => 'Tamad' ]), 'ordered hash decode');
    my %decoded = @{ $decoded->value };
    is_deeply(\%decoded, $perl, 'ordered hash decode');
}

 view all matches for this distribution


BSD-Process

 view release on metacpan or  search on metacpan

Process.pm  view on Meta::CPAN

Returns an (unsorted) array of pids of all the running processes
on the system. Note: fleet-footed processes may have disappeared
between the time the snapshot is taken and the time the code
subsequently gets around to asking for more information about
them. On the other hand, getting this list is very fast. If you
want the set of current processes on the system decoded as
C<BSD::Process> objects, you should be looking at the C<all>
meta-constructor.

The routine C<list> is not exportable. It may be exported under
the name C<process_info>.

Process.pm  view on Meta::CPAN

Amount of real time used by the children processes (if any) of the
process. B<F5+>

=item process_flags, flag

A bitmap of process flags (decoded in the following methods as 0
or 1).

=item posix_advisory_lock, advlock

Flag indicating whether the process holds a POSIX advisory lock. B<F5+>

Process.pm  view on Meta::CPAN


Flag indicating that the process is a session leader. B<F5+>

=item process_status, stat

Numeric value indicating the status of the process, decoded via the
following attibutes. B<F5+>

=item is_being_forked, stat_1

Status indicates that the process is being forked. B<F5+>

 view all matches for this distribution


BSD-Sysctl

 view release on metacpan or  search on metacpan

Sysctl.pm  view on Meta::CPAN

variable represents a heterogeneous collection of values (for
instance, C<kern.clockrate>, C<vm.vmtotal>). In these cases, the
hash key names are reasonably self-explanatory, however, passing
familiarity with kernel data structures is expected.

A certain number of opaque variables are fully decoded (and the
results are returned as hashes), whereas the C<sysctl> binary renders
them as a raw hexdump (for example, C<net.inet.tcp.stats>).

=item sysctl_set

Sysctl.pm  view on Meta::CPAN

=item iterator

Creates an iterator that may be used to walk through the sysctl
variable tree. If no parameter is given, the iterator defaults
to the first entry of the tree. Otherwise, if a paramter is
given, it is decoded as a sysctl variable. If the decoding
fails, undef is returned.

  my $k = BSD::Sysctl->iterator( 'kern' );
  while ($k->next) {
    print $k->name, '=', $k->value, "\n";

 view all matches for this distribution


BSON-XS

 view release on metacpan or  search on metacpan

t/lib/TestUtils.pm  view on Meta::CPAN

    ->allow_bignum
    ->allow_blessed
    ->convert_blessed;

sub normalize_json {
    my $decoded = $json_codec->decode(shift);
    return $json_codec->encode($decoded);
}

sub to_extjson {
    my $data = BSON->perl_to_extjson($_[0], { relaxed => $_[1] });
    return $json_codec->encode($data);

 view all matches for this distribution


BSON

 view release on metacpan or  search on metacpan

lib/BSON.pm  view on Meta::CPAN


#pod =attr wrap_dbrefs
#pod
#pod If set to true, during decoding, documents with the fields C<'$id'> and
#pod C<'$ref'> (literal dollar signs, not variables) will be wrapped as
#pod L<BSON::DBRef> objects.  If false, they are decoded into ordinary hash
#pod references (or ordered hashes, if C<ordered> is true).
#pod
#pod The default is true.
#pod
#pod =cut

lib/BSON.pm  view on Meta::CPAN

#pod
#pod     $doc = $codec->decode_one( $byte_string );
#pod     $doc = $codec->decode_one( $byte_string, \%options );
#pod
#pod Takes a byte string with a BSON-encoded document and returns a
#pod hash reference representing the decoded document.
#pod
#pod An optional hash reference of options may be provided.  Valid options include:
#pod
#pod =for :list
#pod * dt_type – overrides codec default

lib/BSON.pm  view on Meta::CPAN


=head2 wrap_dbrefs

If set to true, during decoding, documents with the fields C<'$id'> and
C<'$ref'> (literal dollar signs, not variables) will be wrapped as
L<BSON::DBRef> objects.  If false, they are decoded into ordinary hash
references (or ordered hashes, if C<ordered> is true).

The default is true.

=head2 wrap_numbers

lib/BSON.pm  view on Meta::CPAN


    $doc = $codec->decode_one( $byte_string );
    $doc = $codec->decode_one( $byte_string, \%options );

Takes a byte string with a BSON-encoded document and returns a
hash reference representing the decoded document.

An optional hash reference of options may be provided.  Valid options include:

=over 4

 view all matches for this distribution


( run in 1.153 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )