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


Datahub-Factory

 view release on metacpan or  search on metacpan

lib/Datahub/Factory/Indexer/Solr.pm  view on Meta::CPAN

    );

    $response = $self->out->request($request);

    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } else {
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $response->message,
            url              => $response->request->uri->as_string,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return undef;
    }
}

 view all matches for this distribution


DateTime-Format-JP

 view release on metacpan or  search on metacpan

lib/DateTime/Format/JP.pm  view on Meta::CPAN


=head1 DESCRIPTION

This module is used to parse and format Japanese date and time. It is lightweight and yet versatile.

It implements 2 main methods: L</parse_datetime> and L</format_datetime> both expect and return decoded utf8 string.

You can use L<Encode> to decode and encode from perl internal utf8 representation to real utf8 and vice versa.

=head1 METHODS

 view all matches for this distribution


DateTime-Format-Japanese

 view release on metacpan or  search on metacpan

lib/DateTime/Format/Japanese.pm  view on Meta::CPAN

=head1 DESCRIPTION

This module implements a DateTime::Format module that can read Japanese
date notations and create a DateTime object, and vice versa.

All formatting methods will return a decoded utf-8 string, unless otherwise
specified explicitly via the output_encoding parameter.

All parsing methods expect a decoded utf-8 string, unless otherwise specified
explicitly via the input_encoding parameter

=head1 METHODS

=head2 new()

lib/DateTime/Format/Japanese.pm  view on Meta::CPAN


This function will parse a Japanese date/time string and convert it to a
DateTime object. If the parsing is unsuccessful, it will croak.

Note that if you didn't provide a input_encoding parameter, the given
string is assumed to be decoded utf-8.

This function should be able to parse almost all of the common Japanese
date notations, whether they are written using ascii numerals, double byte
numerals, and kanji numerals. The date components (year, month, day or
era name, era year, month, day) must be present in the string. The time

 view all matches for this distribution


Debian-Apt-PM

 view release on metacpan or  search on metacpan

script/dpkg-scanpmpackages  view on Meta::CPAN

	my $response = $ua->get($url);
	
	die 'failed to fetch '.$url.' - '.$response->status_line
		if (not $response->is_success);
	
	IO::Any->spew([ $filename ], $response->decoded_content);
	
	return;
}

sub _trim {

 view all matches for this distribution


Debian-Snapshot

 view release on metacpan or  search on metacpan

lib/Debian/Snapshot.pm  view on Meta::CPAN

	$url = $self->url . $url;

	my $response = $self->user_agent->get($url, @_);

	die $response->status_line unless $response->is_success;
	return $response->decoded_content;
}

sub _get_json {
	my $self = shift;
	my $json = $self->_get(@_);

 view all matches for this distribution


Decaptcha-TextCaptcha

 view release on metacpan or  search on metacpan

ex/live-test.pl  view on Meta::CPAN


my $url = "http://api.textcaptcha.com/$key";
while (1) {
    my $res = $ua->get($url);
    next unless $res->is_success;
    my $content = $res->decoded_content;

    my ($q) = $content =~ m[<question>(.*?)</question>];
    decode_entities($q);
    my $a = decaptcha($q) // '';
    my $md5 = md5_hex $a;

 view all matches for this distribution


Decode-Source

 view release on metacpan or  search on metacpan

Source.pm  view on Meta::CPAN


Decode::Source makes it possible to write perl programs in any script or
encoding supported by the C<Encode> module. Variable names can contain
non-ASCII characters, just as when you use the C<use utf8> pragma. All
theese characters, both in identifiers and string literals, will be
decoded to perl's internal utf-8 form, before execution.

The syntax are similar to C<use utf8> and C<no utf8>, but Decode::Source
also takes an optional argument with source encoding. This argument can be 
any argument that C<Encode>'s C<decode> function accept as a valid
encoding. See also L<Encode>.

 view all matches for this distribution


Deep-Encode

 view release on metacpan or  search on metacpan

Encode.xs  view on Meta::CPAN

	}
}

void from_to_cb( pp_func pf, SV * data){
    int ret_list_size;
    SV *decoded_sv;
    dSP;
    ENTER;
    SAVETMPS;

    if ( !  pf->fastinit ){

Encode.xs  view on Meta::CPAN


    SPAGAIN;
    if (ret_list_size != 1){
	croak( "A big trouble");
    }
    decoded_sv = POPs;
    PUTBACK;

    PUSHMARK(SP);
    XPUSHs( pf->argv[1] );
    XPUSHs( decoded_sv );
    PUTBACK;


    if ( pf->fastinit == 1 ){
    	ret_list_size = call_sv( (SV *) pf->meth2, G_SCALAR);

Encode.xs  view on Meta::CPAN

    }
    SPAGAIN;
    if (ret_list_size != 1){
	croak( "A big trouble");
    }
    decoded_sv = POPs;
    sv_setsv( data , decoded_sv );
    PUTBACK;
    FREETMPS;
    LEAVE;
}

void from_to_cb_00( pp_func pf, SV * data){
    int ret_list_size;
    SV *decoded_sv;
    dSP;
    ENTER;
    SAVETMPS;

    PUSHMARK(SP);

Encode.xs  view on Meta::CPAN

    ret_list_size = call_method("decode", G_SCALAR);
    SPAGAIN;
    if (ret_list_size != 1){
	croak( "A big trouble");
    }
    decoded_sv = POPs;
    PUTBACK;

    PUSHMARK(SP);
    XPUSHs( pf->argv[1] );
    XPUSHs( decoded_sv );
    PUTBACK;


    ret_list_size = call_method("encode", G_SCALAR);
    SPAGAIN;
    if (ret_list_size != 1){
	croak( "A big trouble");
    }
    decoded_sv = POPs;
    sv_setsv( data , decoded_sv );
    PUTBACK;
    FREETMPS;
    LEAVE;
}

 view all matches for this distribution


Deliantra-Client

 view release on metacpan or  search on metacpan

DC/MapWidget.pm  view on Meta::CPAN


         print "getting map revision for $mapname...\n";

         # try to get the most recent head revision, what a hack,
         # this should have been returned while downloading *sigh*
         my $log = (DC::lwp_check $ua->get ("$editsup->{cvs_root}/$mapname?view=log&logsort=rev"))->decoded_content;

         if ($log =~ /\?rev=(\d+\.\d+)"/) {
            my $rev = $1;

            print "downloading revision $rev...\n";

            my $map = (DC::lwp_check $ua->get ("$editsup->{cvs_root}/$mapname?rev=$rev"))->decoded_content;

            my $meta = {
               %$editsup,
               path     => $mapname,
               revision => $rev,

DC/MapWidget.pm  view on Meta::CPAN

#           if ($res->is_error) {
#              # fatal condition
#              warn $res->status_line;
#           } else {
#              # script replies are marked as {{..}}
#              my @msgs = $res->decoded_content =~ m/\{\{(.*?)\}\}/g;
#              warn map "$_\n", @msgs;
#           }
         } else {
            die "viewvc parse error, unable to detect revision\n";
         }

 view all matches for this distribution


Devel-Debug-DBGp

 view release on metacpan or  search on metacpan

DB/MIME/Base64.pm  view on Meta::CPAN

=head1 SYNOPSIS

 use DB::MIME::Base64::Perl;

 $encoded = encode_base64('Aladdin:open sesame');
 $decoded = decode_base64($encoded);

=head1 DESCRIPTION

This module provide the same interface as C<DB::MIME::Base64>, but these
functions are implemented in pure perl.

DB/MIME/Base64.pm  view on Meta::CPAN


=item decode_base64($str)

Decode a base64 string by calling the decode_base64() function.  This
function takes a single argument which is the string to decode and
returns the decoded data.

Any character not part of the 65-character base64 subset is
silently ignored.  Characters occurring after a '=' padding character
are never decoded.

=back

=head1 COPYRIGHT

 view all matches for this distribution


Devel-IPerl-Plugin-Perlbrew

 view release on metacpan or  search on metacpan

bin/perlbrewise-spec  view on Meta::CPAN

  codeset range. Neither of these flags conflict with each other, although
  some combinations make less sense than others.
  
  Care has been taken to make all flags symmetrical with respect to
  C<encode> and C<decode>, that is, texts encoded with any combination of
  these flag values will be correctly decoded when the same flags are used
  - in general, if you use different flag settings while encoding vs. when
  decoding you likely have a bug somewhere.
  
  Below comes a verbose discussion of these flags. Note that a "codeset" is
  simply an abstract set of character-codepoint pairs, while an encoding

bin/perlbrewise-spec  view on Meta::CPAN

  =item C<utf8> flag disabled
  
  When C<utf8> is disabled (the default), then C<encode>/C<decode> generate
  and expect Unicode strings, that is, characters with high ordinal Unicode
  values (> 255) will be encoded as such characters, and likewise such
  characters are decoded as-is, no changes to them will be done, except
  "(re-)interpreting" them as Unicode codepoints or Unicode characters,
  respectively (to Perl, these are the same thing in strings unless you do
  funny/weird/dumb stuff).
  
  This is useful when you want to do the encoding yourself (e.g. when you

bin/perlbrewise-spec  view on Meta::CPAN

     $json =~ s/"__proto__"\s*:/"__proto__renamed":/g;
  
  This works because C<__proto__> is not valid outside of strings, so every
  occurrence of C<"__proto__"\s*:> must be a string used as property name.
  
  Unicode non-characters between U+FFFD and U+10FFFF are decoded either
  to the recommended U+FFFD REPLACEMENT CHARACTER (see Unicode PR #121:
  Recommended Practice for Replacement Characters), or in the binary or
  relaxed mode left as is, keeping the illegal non-characters as before.
  
  Raw non-Unicode characters outside the valid unicode range fail now to

 view all matches for this distribution


Devel-IPerl

 view release on metacpan or  search on metacpan

lib/Devel/IPerl/Display/Role/MIMESource.pm  view on Meta::CPAN

		return $data;
	} elsif( $self->uri ) {
		my $ua = LWP::UserAgent->new();
		my $response = $ua->get( $self->uri );
		die "Could not retrieve data" unless $response->is_success;
		my $data = $response->decoded_content;
		return $data;
	}
	die "No data to build display"; # TODO create exception class
}

 view all matches for this distribution


Devel-PatchPerl

 view release on metacpan or  search on metacpan

lib/Devel/PatchPerl/Hints.pm  view on Meta::CPAN

=item C<hint_file>

Takes an optional argument which is the OS name ( as would be returned by C<$^O> ).
By default it will use C<$^O>.

In a scalar context, Will return the decoded content of the C<hints> file suitable for writing straight to a
file handle or undef list if there isn't an applicable C<hints> file for the given or derived
OS.

If called in a list context, will return a list, the first item will be the name of the C<hints> file that
will need to be amended, the second item will be a string with the decoded content of the C<hints> file suitable
for writing straight to a file handle. Otherwise an empty list will be returned.

=item C<hints>

Takes no arguments, returns a list of OS names for which there are C<hints> files.

 view all matches for this distribution


Devel-QuickCover

 view release on metacpan or  search on metacpan

lib/Devel/QuickCover/Report.pm  view on Meta::CPAN


sub load {
    my ($self, $file) = @_;

    my $data = path($file)->slurp_raw;
    my $decoded = Sereal::decode_sereal($data);

    if (exists $decoded->{files}) {
        $self->{data} = $decoded;
    } else {
        $self->{data} = {
            files       => $decoded,
            metadata    => {},
        };
    }
    $self->{changes} = 0;
}

lib/Devel/QuickCover/Report.pm  view on Meta::CPAN


sub merge {
    my ($self, $file) = @_;

    my $json = path($file)->slurp;
    my $decoded = decode_json($json);
    my $files = $self->{data}{files};
    my $subs = $self->{data}{subs};

    # I don't think custom merging functions are needed
    @{$self->{data}{metadata}}{keys %{$decoded->{metadata}}} =
        values %{$decoded->{metadata}};

    for my $name (keys %{$decoded->{files}}) {
        my $coverage = $decoded->{files}{$name};
        for my $line (@{$coverage->{covered}}) {
            $files->{$name}->{$line}++;
        }
        for my $line (@{$coverage->{present}}) {
            $files->{$name}->{$line} //= 0;

 view all matches for this distribution


Devel-StackTrace-AsHTML

 view release on metacpan or  search on metacpan

lib/Devel/StackTrace/AsHTML.pm  view on Meta::CPAN


no warnings 'qw';
my %enc = qw( & &amp; > &gt; < &lt; " &quot; ' &#39; );

# NOTE: because we don't know which encoding $str is in, or even if
# $str is a wide character (decoded strings), we just leave the low
# bits, including latin-1 range and encode everything higher as HTML
# entities. I know this is NOT always correct, but should mostly work
# in case $str is encoded in utf-8 bytes or wide chars. This is a
# necessary workaround since we're rendering someone else's code which
# we can't enforce string encodings.

 view all matches for this distribution


Devel-StackTrace-AsHTMLExtended

 view release on metacpan or  search on metacpan

lib/Devel/StackTrace/AsHTMLExtended.pm  view on Meta::CPAN


no warnings 'qw';
my %enc = qw( & &amp; > &gt; < &lt; " &quot; ' &#39; );

# NOTE: because we don't know which encoding $str is in, or even if
# $str is a wide character (decoded strings), we just leave the low
# bits, including latin-1 range and encode everything higher as HTML
# entities. I know this is NOT always correct, but should mostly work
# in case $str is encoded in utf-8 bytes or wide chars. This is a
# necessary workaround since we're rendering someone else's code which
# we can't enforce string encodings.

 view all matches for this distribution


Devel-StackTrace-WithLexicals

 view release on metacpan or  search on metacpan

t/from-devel-stacktrace/02-bad-utf8.t  view on Meta::CPAN

use Devel::StackTrace;

# This should be invalid UTF8
my $raw_bad = do { use bytes; chr(0xED) . chr(0xA1) . chr(0xBA) };

my $decoded = Encode::decode( 'utf8' => $raw_bad );
my $trace = foo($decoded);

my $string = eval { $trace->as_string() };

my $e = $@;
is(

 view all matches for this distribution


Devel-StackTrace

 view release on metacpan or  search on metacpan

t/02-bad-utf8.t  view on Meta::CPAN

use Devel::StackTrace;

# This should be invalid UTF8
my $raw_bad = do { use bytes; chr(0xED) . chr(0xA1) . chr(0xBA) };

my $decoded = Encode::decode( 'utf8' => $raw_bad );
my $trace   = foo($decoded);

my $string = eval { $trace->as_string() };

my $e = $@;
is(

 view all matches for this distribution


Devel-StatProfiler

 view release on metacpan or  search on metacpan

src/snappy/csnappy.h  view on Meta::CPAN

 * REQUIRES: start points to compressed data.
 * REQUIRES: n is length of available compressed data.
 *
 * Returns SNAPPY_E_HEADER_BAD on error.
 * Returns number of bytes read from input on success.
 * Stores decoded length into *result.
 */
int
csnappy_get_uncompressed_length(
	const char *start,
	uint32_t n,

 view all matches for this distribution


Devel-StringInfo

 view release on metacpan or  search on metacpan

lib/Devel/StringInfo.pm  view on Meta::CPAN

	isa => "Bool",
	is  => "rw",
	default => 0,
);

has include_decoded => (
	isa => "Bool",
	is  => "rw",
	default => 1,
);

lib/Devel/StringInfo.pm  view on Meta::CPAN

}

sub gather_data_utf8_octets {
	my ( $self, $string ) = @_;

	my $decoded = decode( utf8 => $string );
	
	my $guessed = sorted_hash $self->gather_data_encoding_info($string);

	if ( ($guessed->{guessed_encoding}||'') eq 'utf8' ) {
		return (
			valid_utf8  => 1,
			( $self->include_decoded ? $self->gather_data_decoded( $decoded, $string ) : () ),,
		);
	} else {
		return (
			valid_utf8 => 1,
			( $self->include_decoded ? (
				as_utf8    => sorted_hash($self->gather_data_decoded( $decoded, $string ) ),
				as_guess   => $guessed,
			) : () ),
		);
	}
}

lib/Devel/StringInfo.pm  view on Meta::CPAN

	return unless $self->guess_encoding;

	my $decoder = Encode::Guess::guess_encoding( $string, $self->encoding_suspects );

	if ( ref $decoder ) {
		my $decoded = $decoder->decode($string);

		return (
			guessed_encoding => $decoder->name,
			( $self->include_decoded ? $self->gather_data_decoded( $decoded, $string ) : () ),
		);
	} else {
		return (
			guess_error => $decoder,
		);
	}
}

sub gather_data_decoded {
	my ( $self, $decoded, $string ) = @_;

	if ( $string ne $decoded ) {
		return (
			decoded_is_same => 0,
			decoded => {
				string => $decoded,
				$self->gather_data($decoded),
			}
		);
	} else {
		return (
			decoded_is_same => 1,
		);
	}
}

__PACKAGE__;

lib/Devel/StringInfo.pm  view on Meta::CPAN

=item include_value_info

Include some information about the string value (does it contain C<0x00> chars,
is it alphanumeric, does it have newlines, etc).

=item include_decoded

Whether to include a recursive dump of the decoded versions of a non unicode
string.

=item include_hex

Whether to include a L<Data::HexDump::XXD> dump in C<dump_info>.

 view all matches for this distribution


Devel-hdb

 view release on metacpan or  search on metacpan

lib/Devel/hdb/App/Eval.pm  view on Meta::CPAN

  code      => String of Perl code to evaluate
  wantarray => 0, 1 or undef; whether to evaluate the code in scalar list
               or void context

Returns 200 if successful and the result in the body.  The body contents
should be decoded using Data::Transform::ExplicitMetadata
Returns 409 if there was an exception.  The body contents should be decoded
using Data::Transform::ExplicitMetadata

=item GET /getvar/<level>

Get a list of all the lexical variables at the given stack level.

lib/Devel/hdb/App/Eval.pm  view on Meta::CPAN

  @hash{key1,key2}  Hash slice
  @array[1 .. 2]    Array slice with a range

Returns 200 and JSON in the body.  The returned JSON is an
encoded version of whatever the Perl code evaluated to, and should
be decoded with Data::Transform::ExplicitMetadata.

=back

=head1 SEE ALSO

 view all matches for this distribution


Device-AVR-UPDI

 view release on metacpan or  search on metacpan

bin/avr-updi  view on Meta::CPAN

   $RESET_REQUIRED++;

   print STDERR "Done\n";
}

sub _print_decoded_fields
{
   my ( $reg, @fields ) = @_;

   while( @fields ) {
      my $name = shift @fields;

bin/avr-updi  view on Meta::CPAN

   make_updi;

   my @regs = map { $updi->ldcs( $_ )->get } 0 .. 0x0C;

   printf "UPDI.STATUSA        = %02X", $regs[0];
   _print_decoded_fields $regs[0], UPDIREV => 0xF0;
   printf "     STATUSB        = %02X", $regs[1];
   _print_decoded_fields $regs[1], PSIG => 0x0F;
   printf "     CTRLA          = %02X", $regs[2];
   _print_decoded_fields $regs[2], IBDLY => (1<<7), PARD => (1<<5), DTD => (1<<4), RSD => (1<<3), GTVAL => 0x07;
   printf "     CTRLB          = %02X", $regs[3];
   _print_decoded_fields $regs[3], NACKDIS => (1<<4), CCDETDIS => (1<<3), UPDIDIS => (1<<2);

   # [4] to [6] reserved
   #
   printf "     ASI_KEY_STATUS = %02X", $regs[7];
   _print_decoded_fields $regs[7], UROWWRITE => (1<<5), NVMPROG => (1<<4), CHIPERASE => (1<<3);
   printf "     ASI_RESET_REQ  = %02X\n", $regs[8];

   printf "     ASI_CTRLA      = %02X", $regs[9];
   _print_decoded_fields $regs[9], UPDICLKDIV => 0x03;
   printf "     ASI_SYS_CTRLA  = %02X", $regs[10];
   _print_decoded_fields $regs[10], UROWDONE => (1<<1), CLKREQ => (1<<0);
   printf "     ASI_SYS_STATUS = %02X", $regs[11];
   _print_decoded_fields $regs[11], ERASE_FAILED => (1<<6), SYSRST => (1<<5), INSLEEP => (1<<4),
      NVMPROG => (1<<3), UROWPROG => (1<<2), LOCKSTATUS => (1<<0);
   printf "     ASI_CRC_STATUS = %02X", $regs[12];
   _print_decoded_fields $regs[12], CRC_STATUS => 0x07;
}

=head2 reset

Sends a reset request.

 view all matches for this distribution


Device-CableModem-Motorola-SB4200

 view release on metacpan or  search on metacpan

lib/Device/CableModem/Motorola/SB4200.pm  view on Meta::CPAN

    my $self = shift;
    my $url  = shift;
    my $r    = $self->agent->get($url);

    if ( $r->is_success ) {
        my $raw = $r->decoded_content;
        HTTP::Error::NotFound->throw(
            "The address $url is invalid. Server returned a 404 error"
        ) if $raw =~ RE_404;
        return $raw;
    }

lib/Device/CableModem/Motorola/SB4200.pm  view on Meta::CPAN

    my $self = shift;
    my $req  = shift;
    my $r    = $self->agent->request($req);

    if ( $r->is_success ) {
        my $raw = $r->decoded_content;
        HTTP::Error::NotFound->throw(
            'The request is invalid. Server returned a 404 error'
        ) if $raw =~ RE_404;
        return $raw;
    }

 view all matches for this distribution


Device-Chip-MAX7219

 view release on metacpan or  search on metacpan

lib/Device/Chip/MAX7219.pm  view on Meta::CPAN

   await $chip->write_raw( $digit, $bits );

Writes the value at the given digit, setting the raw column lines to the 8-bit
value given.

Switches the digit into undecoded raw mode if not already so.

=cut

async method write_raw ( $digit, $bits )
{

 view all matches for this distribution


Device-Chip-SDCard

 view release on metacpan or  search on metacpan

lib/Device/Chip/SDCard.pm  view on Meta::CPAN


=head2 read_csd

   $data = await $card->read_csd;

Returns a C<HASH> reference containing decoded fields from the SD card's CSD
("card-specific data") register.

This hash will contain the following fields:

   TAAC

lib/Device/Chip/SDCard.pm  view on Meta::CPAN

   PERM_WRITE_PROTECT
   TEMP_WRITE_PROTECT
   FILE_FORMAT

The hash will also contain the following calculated fields, derived from the
decoded fields above for convenience of calling code.

   blocks          # number of blocks implied by C_SIZE / C_SIZE_MULT
   bytes           # number of bytes of storage, implied by blocks and READ_BL_LEN

=cut

lib/Device/Chip/SDCard.pm  view on Meta::CPAN


=head2 read_ocr

   $fields = await $card->read_ocr;

Returns a C<HASH> reference containing decoded fields from the card's OCR
("operating conditions register").

This hash will contain the following fields:

   BUSY

 view all matches for this distribution


Device-Delcom-VSI

 view release on metacpan or  search on metacpan

lib/Device/Delcom/VSI.pm  view on Meta::CPAN

}


=item read_system_variables

Read the system variables. The results are decoded and returned as
a hash reference. The data stored in the hash reference is:

=over 4

=item buzzer_running

lib/Device/Delcom/VSI.pm  view on Meta::CPAN

}


=item read_system_variables

Read the formware information. The results are decoded and returned as
a hash reference. The data stored in the hash reference is:

=over 4

=item serial_number

 view all matches for this distribution


Device-ELM327

 view release on metacpan or  search on metacpan

lib/Device/ELM327.pm  view on Meta::CPAN


Expand a trouble code (e.g. 4216) to the full ISO code (C0216)

This function is called by 'Read'.

 $decoded_code = $obd->DecodeTroubleCode($code);
=cut

sub DecodeTroubleCode
{
	my ($self, $code) = @_;

lib/Device/ELM327.pm  view on Meta::CPAN

	}

  my $code_prefix = ($code & $code_prefix_mask) >> 12;
  $code &= $code_mask;
  $code = sprintf("%03X", $code);
  my $decoded_code = "$codes[$code_prefix]$code";

  if ($self->{'debug_level'} > 1)
  {
    print "Code prefix: $code_prefix, Code: $code, Decoded: $decoded_code\n";
  }
	return $decoded_code;
}


#*****************************************************************

lib/Device/ELM327.pm  view on Meta::CPAN

    }
  }

  if ($self->{'debug_level'} > 1)
  {
    print "\nFully decoded results:\n";  
    print Dumper($self->{'results'});
  }

  return $status;
}

 view all matches for this distribution


Device-Firewall-PaloAlto

 view release on metacpan or  search on metacpan

lib/Device/Firewall/PaloAlto/API.pm  view on Meta::CPAN

    return _check_api_response($r);
}
  
# Checks whether the HTTP response is an error.
# Returns an error object if there's an HTTP error.
# Returns the decoded HTTP content on success.
sub _check_http_response {
    my ($http_response) = @_;

    if ($http_response->is_error) {
        my $err = "HTTP Error: @{[$http_response->status_line]} - @{[$http_response->code]}";
        return fatal_error($err, 0);
    }

    return $http_response->decoded_content;
}


# Parses the API response and checks if it's an API error.
# Returns a data structure representing the XML content on success.

 view all matches for this distribution


Device-GPIB

 view release on metacpan or  search on metacpan

lib/Device/GPIB/Advantest/TR4131.pm  view on Meta::CPAN


    my $data = $self->sendAndRead('OPTBW'); # Read 701 data points in 1402 bytes
    die "Could not read screen data" unless defined $data;
    my $length = length($data);
    die "Screen data wrong length $length" unless $length == 1402;
    my @decoded = unpack("n701", $data);
    return @decoded;
}

1;

 view all matches for this distribution


Device-Gsm

 view release on metacpan or  search on metacpan

lib/Device/Gsm.pm  view on Meta::CPAN

    my($net_name, $net_code) = $gsm->network();
    # Returns ('Wind Telecom Spa', '222 88')

This obviously varies depending on country and network operator. For me now,
it holds "Wind Telecomunicazioni SpA". It is not guaranteed that the mobile
phone returns the decoded network name. It can also return a gsm network code,
like C<222 88>. In this case, an attempt to decode the network name is made.

Be sure to call the C<network()> method when already registered to gsm
network. See C<register()> method.

 view all matches for this distribution


( run in 1.514 second using v1.01-cache-2.11-cpan-9383018d099 )