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


ETL-Yertl

 view release on metacpan or  search on metacpan

lib/ETL/Yertl/Adapter/graphite.pm  view on Meta::CPAN

    $url->query_form( %form );

    #; say "Fetching $url";
    my $res = $self->http_client->GET( $url )->get;

    #; say $res->decoded_content;
    if ( $res->is_error ) {
        die sprintf "Error fetching metric '%s': " . $res->decoded_content . "\n", $metric;
    }

    my $result = decode_json( $res->decoded_content );
    my @points;
    for my $series ( @{ $result } ) {
        for my $point ( @{ $series->{datapoints} } ) {
            push @points, {
                metric => $series->{target},

 view all matches for this distribution


EZID

 view release on metacpan or  search on metacpan

lib/EZID.pm  view on Meta::CPAN

    my %metadata;

    my $ua = LWP::UserAgent->new;
    my $r = $ua->get("http://ezid.cdlib.org/id/$identifier");
    if ($r->is_success) {
        $response = { _parse($r->decoded_content) };
    } else {
        $self->{_error_msg} = $r->decoded_content;
    }

    return $response;
}

lib/EZID.pm  view on Meta::CPAN

        'Content-Type' => "text/plain; charset=UTF-8",
        'Content' => $content);

    my $response;
    if ($r->is_success) {
        $response = { _parse($r->decoded_content) };
    } else {
        $self->{_error_msg} = $r->decoded_content;
    }

    return $response;
}

 view all matches for this distribution


Egg-Release-Authorize

 view release on metacpan or  search on metacpan

lib/Egg/Model/Auth/Crypt/CBC.pm  view on Meta::CPAN


=head1 METHODS

=head2 password_check ([CRYPT_PASSWORD], [INPUT_PAWWORD])

CRYPT_PASSWORD is decoded and whether it agrees is confirmed with INPUT_PAWWORD.

=head2 create_password ([PLAIN_PASSWORD])

PLAIN_PASSWORD is encrypted.

 view all matches for this distribution


Eixo-Rest

 view release on metacpan or  search on metacpan

lib/Eixo/Rest/Request.pm  view on Meta::CPAN

sub send {die ref($_[0]) . "::send: MUST BE DEFINED"}

sub unmarshall{
    my ($self, $response) = @_;

    my $content = $response->decoded_content(
        default_charset=> 'UTF-8'
    );

    # nowadays (HTTP::Message v6.11)
    # decoded_content isn't decoding utf8 charset
    # if content_type is application/json
    if($response->content_type eq 'application/json'){
        use Encode;
        $content = Encode::decode('UTF-8', $content);
    }

 view all matches for this distribution


Elastic-Model

 view release on metacpan or  search on metacpan

lib/Elastic/Model/Types.pm  view on Meta::CPAN

    has 'binary_field' => (
        is  => 'ro',
        isa => Binary
    );

Inherits from the C<Defined> type. Is automatically Base64 encoded/decoded.

=head2 GeoPoint

    use Elastic::Model::Types qw(GeoPoint);

 view all matches for this distribution


ElasticEmail

 view release on metacpan or  search on metacpan

lib/ElasticEmail.pm  view on Meta::CPAN

            push(@{$allTheData[0]}, ($fieldName, [$file, $localFileName]));
		    $num++;
        }
        $response = $ua->post($fullURL, Content_Type => 'multipart/form-data', Content => @allTheData);
    }
    my $content  = $response->decoded_content();
    return $content;
} 



 view all matches for this distribution


ElasticSearchX-Model-Generator

 view release on metacpan or  search on metacpan

lib/ElasticSearchX/Model/Generator.pm  view on Meta::CPAN


returns the content of the URL at C<mapping_url>

=head2 _build__mapping_data

returns the decoded data from C<JSON> stored in C<_mapping_content>

=head1 AUTHOR

Kent Fredric <kentfredric@gmail.com>

 view all matches for this distribution


Elastijk

 view release on metacpan or  search on metacpan

lib/Elastijk.pm  view on Meta::CPAN


=head2 Elastijk::request( $args :HashRef ) : ($status :Int, $response :HashRef)

Making a request to the Elasticsearch server specified in C<$args>. It returns 2
values. C<$status> is the HTTP status code of the response, and the C<$response>
decoded as HashRef. Elasticsearch API always respond a single HashRef as JSON
text, this might or might not be changed in the future, if it is changed then
this function will be adjusted accordingly.

The C<$args> is a HashRef takes contains the following key-value pairs:

lib/Elastijk.pm  view on Meta::CPAN

=head2 Elastijk::request_raw( $args :HashRef ) : ($status :Int, $response :Str)

Making a request to the Elasticsearch server specified in C<$args>. The main
difference between this function and C<Elastijk::request> is that
C<$args->{body}> s expected to be a String scalar, rather then a HashRef. And
the $response is not decoded from JSON. This function can be used if users wish
to use their own JSON parser to parse response, or if they wish to delay the
parsing to be done latter in some bulk-processing pipeline.

=head1 OBJECT

 view all matches for this distribution


Email-Abstract

 view release on metacpan or  search on metacpan

lib/Email/Abstract.pm  view on Meta::CPAN


=head2 as_string

  my $string = $email->as_string;

This returns the whole email as a decoded string.

=head2 cast

  my $mime_entity = $email->cast('MIME::Entity');

lib/Email/Abstract.pm  view on Meta::CPAN

#pod
#pod =head2 as_string
#pod
#pod   my $string = $email->as_string;
#pod
#pod This returns the whole email as a decoded string.
#pod
#pod =head2 cast
#pod
#pod   my $mime_entity = $email->cast('MIME::Entity');
#pod

 view all matches for this distribution


Email-Address

 view release on metacpan or  search on metacpan

t/ascii.t  view on Meta::CPAN

  # ok( $utf_8 !~ $Email::Address::addr_spec, "...it !~ addr_spec");
}

{
  my (@addr) = Email::Address->parse($text);
  is(@addr, 0, "unicode (decoded) address: not ok");

  # ok( $text =~ $Email::Address::addr_spec, "...it !~ addr_spec");
}

{

 view all matches for this distribution


Email-Barcode-Decode

 view release on metacpan or  search on metacpan

lib/Email/Barcode/Decode.pm  view on Meta::CPAN


    my $ebd = Email::Barcode::Decode->new(email => $msg);
    my @symbols = $ebd->get_symbols;
    foreach my $symbol (@symbols) {
        print(
            'decoded '  . $symbol->{type} .
            ' symbol "' . $symbol->{data} .'"'.
            ' file "'   . $symbol->{filename} .'"'.
            "\n"
        );
    }

 view all matches for this distribution


Email-MIME-CreateHTML

 view release on metacpan or  search on metacpan

t/UTF-8_html.t  view on Meta::CPAN

binmode $builder->failure_output, ":encoding(UTF-8)";
binmode $builder->todo_output,    ":encoding(UTF-8)";

my $response = LWP::UserAgent->new->get("file://$Bin/data/UTF-8.html");

my $body = $response->decoded_content;

my $from = generate_address('Föö', 'test@foo.example');
my $to   = generate_address('Bäz', 'test@baz.example');

my $subject = encode_mimeword(encode_utf8('Sübject'), 'Q', 'UTF-8');

 view all matches for this distribution


Email-MIME-Encodings

 view release on metacpan or  search on metacpan

lib/Email/MIME/Encodings.pm  view on Meta::CPAN


#pod =head1 SYNOPSIS
#pod
#pod   use Email::MIME::Encodings;
#pod   my $encoded = Email::MIME::Encodings::encode(base64 => $body);
#pod   my $decoded = Email::MIME::Encodings::decode(base64 => $encoded);
#pod
#pod If a third argument is given, it is the encoding to which to fall back.  If no
#pod valid codec can be found (considering both the first and third arguments) then
#pod an exception is raised.
#pod

lib/Email/MIME/Encodings.pm  view on Meta::CPAN


=head1 SYNOPSIS

  use Email::MIME::Encodings;
  my $encoded = Email::MIME::Encodings::encode(base64 => $body);
  my $decoded = Email::MIME::Encodings::decode(base64 => $encoded);

If a third argument is given, it is the encoding to which to fall back.  If no
valid codec can be found (considering both the first and third arguments) then
an exception is raised.

 view all matches for this distribution


Email-MIME-Kit-Assembler-Markdown

 view release on metacpan or  search on metacpan

lib/Email/MIME/Kit/Assembler/Markdown.pm  view on Meta::CPAN

}

sub assemble {
  my ($self, $stash) = @_;

  my $markdown  = ${ $self->kit->get_decoded_kit_entry( $self->path ) };
  my $plaintext = $markdown;


  if ($self->renderer) {
    {

lib/Email/MIME/Kit/Assembler/Markdown.pm  view on Meta::CPAN


  for my $type (keys %content) {
    my $type_wrapper = "$type\_wrapper";

    if (my $wrapper_path = $self->$type_wrapper) {
      my $wrapper = ${ $self->kit->get_decoded_kit_entry($wrapper_path) };

      if ($self->render_wrapper) {
        local $stash->{wrapped_content} = $content{$type};
        local $stash->{part_type}       = $type;
        my $output_ref = $self->renderer->render(\$wrapper, $stash);

 view all matches for this distribution


Email-MIME-Kit

 view release on metacpan or  search on metacpan

lib/Email/MIME/Kit.pm  view on Meta::CPAN

#pod render, and so on.  This, further, means that strings passed to the C<assemble>
#pod method for use in rendering should also be text strings.
#pod
#pod In older versions of Email::MIME::Kit, files read from disk were read in raw
#pod mode and then handled as octet strings.  Meanwhile, the manifest's contents
#pod (and, thus, any templates stored as strings in the manifest) were decoded into
#pod text strings.  This could lead to serious problems.  For example: the
#pod F<manifest.json> file might contain:
#pod
#pod   "header": [
#pod     { "Subject": "Message for [% customer_name %]" },

lib/Email/MIME/Kit.pm  view on Meta::CPAN

has manifest => (reader => 'manifest', writer => '_set_manifest');

my @auto_attrs = (
  [ manifest_reader => ManifestReader => JSON => [ 'read_manifest' ] ],
  [ kit_reader      => KitReader      => Dir  => [ 'get_kit_entry',
                                                   'get_decoded_kit_entry' ] ],
);

for my $tuple (@auto_attrs) {
  my ($attr, $role, $default, $handles) = @$tuple;

lib/Email/MIME/Kit.pm  view on Meta::CPAN

render, and so on.  This, further, means that strings passed to the C<assemble>
method for use in rendering should also be text strings.

In older versions of Email::MIME::Kit, files read from disk were read in raw
mode and then handled as octet strings.  Meanwhile, the manifest's contents
(and, thus, any templates stored as strings in the manifest) were decoded into
text strings.  This could lead to serious problems.  For example: the
F<manifest.json> file might contain:

  "header": [
    { "Subject": "Message for [% customer_name %]" },

 view all matches for this distribution


Email-MIME-MobileJP

 view release on metacpan or  search on metacpan

t/01_parse.t  view on Meta::CPAN


    my $mail = Email::MIME::MobileJP::Parser->new($src->as_string);

    subtest 'subject' => sub {
        is $mail->subject(), 'コンニチワ';
        ok Encode::is_utf8($mail->subject), 'decoded';
    };

    subtest 'carrier' => sub {
        isa_ok $mail->carrier, 'Email::Address::JP::Mobile::DoCoMo';
        is $mail->carrier->name, 'DoCoMo';

 view all matches for this distribution


Email-MIME-RFC2047

 view release on metacpan or  search on metacpan

t/decode.t  view on Meta::CPAN

);

for (my $i=0; $i<@tests; $i+=2) {
    my ($encoded, $expect) = ($tests[$i], $tests[$i+1]);

    my $decoded = $decoder->decode_phrase($encoded);
    is($decoded, $expect, "decode_phrase $encoded");
}

 view all matches for this distribution


Email-MIME-XMTP

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	  Content-Type header; it is now default to UTF-8.

0.40	Thu Aug 18 17:53:06 CEST 2005

	- fixed nusty bug when serializing to XML headers combined with body. Make
	  sure that headers as decoded and body is a valid UTF-8 string into XML.

0.39	Thu Aug 18 01:44:46 CEST 2005

	- fixed bug when Content-Type is not specified; and default to text/plain
	  (and do not base64-encode body text)

 view all matches for this distribution


Email-MIME

 view release on metacpan or  search on metacpan

lib/Email/MIME.pm  view on Meta::CPAN

#pod
#pod   use Email::MIME;
#pod   my $parsed = Email::MIME->new($message);
#pod
#pod   my @parts = $parsed->parts; # These will be Email::MIME objects, too.
#pod   my $decoded = $parsed->body;
#pod   my $non_decoded = $parsed->body_raw;
#pod
#pod   my $content_type = $parsed->content_type;
#pod
#pod ...or...
#pod

lib/Email/MIME.pm  view on Meta::CPAN

#pod =head1 DESCRIPTION
#pod
#pod This is an extension of the L<Email::Simple> module, to handle MIME
#pod encoded messages. It takes a message as a string, splits it up into its
#pod constituent parts, and allows you access to various parts of the
#pod message. Headers are decoded from MIME encoding.
#pod
#pod =head1 METHODS
#pod
#pod Please see L<Email::Simple> for the base set of methods. It won't take
#pod very long. Added to that, you have:

lib/Email/MIME.pm  view on Meta::CPAN


  use Email::MIME;
  my $parsed = Email::MIME->new($message);

  my @parts = $parsed->parts; # These will be Email::MIME objects, too.
  my $decoded = $parsed->body;
  my $non_decoded = $parsed->body_raw;

  my $content_type = $parsed->content_type;

...or...

lib/Email/MIME.pm  view on Meta::CPAN

=head1 DESCRIPTION

This is an extension of the L<Email::Simple> module, to handle MIME
encoded messages. It takes a message as a string, splits it up into its
constituent parts, and allows you access to various parts of the
message. Headers are decoded from MIME encoding.

=head1 PERL VERSION

This library should run on perls released even a long time ago.  It should
work on any version of perl released in the last five years.

lib/Email/MIME.pm  view on Meta::CPAN

=head2 header_str_pairs

  my @pairs = $email->header_str_pairs;

This method behaves like C<header_raw_pairs>, returning a list of field
name/value pairs, but the values have been decoded to character strings, when
possible.

=head2 header_as_obj

  my $first_obj = $email->header_as_obj($field);

lib/Email/MIME.pm  view on Meta::CPAN

#pod =method header_str_pairs
#pod
#pod   my @pairs = $email->header_str_pairs;
#pod
#pod This method behaves like C<header_raw_pairs>, returning a list of field
#pod name/value pairs, but the values have been decoded to character strings, when
#pod possible.
#pod
#pod =method header_as_obj
#pod
#pod   my $first_obj = $email->header_as_obj($field);

 view all matches for this distribution


Email-Outlook-Message

 view release on metacpan or  search on metacpan

lib/Email/Outlook/Message.pm  view on Meta::CPAN

sub _create_mime_plain_body {
  my $self = shift;
  my $charset = $self->_body_plain_character_set;
  my $body_str = $self->{BODY_PLAIN};
  if ($charset ne "UTF-8") {
    # In this case, the body is a string of octets and needs to be decoded.
    $body_str = Encode::decode($charset, $body_str);
  }
  return Email::MIME->create(
    attributes => {
      content_type => "text/plain",

 view all matches for this distribution


Email-Simple

 view release on metacpan or  search on metacpan

lib/Email/Simple/Header.pm  view on Meta::CPAN

#pod
#pod =method header
#pod
#pod This method just calls C<header_raw>.  It's the older name for C<header_raw>,
#pod but it can be a problem because L<Email::MIME>, a subclass of Email::Simple,
#pod makes C<header> return the header's decoded value.
#pod
#pod =cut

sub _str_value { return ref $_[0] ? $_[0][0] : $_[0] }

lib/Email/Simple/Header.pm  view on Meta::CPAN


=head2 header

This method just calls C<header_raw>.  It's the older name for C<header_raw>,
but it can be a problem because L<Email::MIME>, a subclass of Email::Simple,
makes C<header> return the header's decoded value.

=head2 header_raw_set

  $header->header_raw_set($field => @values);

 view all matches for this distribution


Email-Stuffer-TestLinks

 view release on metacpan or  search on metacpan

lib/Email/Stuffer/TestLinks.pm  view on Meta::CPAN

                    my $response = shift;

                    return Future->fail("Response code was " . $response->code) if ($response->code !~ /^2\d\d/);

                    if ($response->content_type eq 'text/html') {
                        my $dom = Mojo::DOM->new($response->decoded_content);
                        if (my $title = $dom->at('title')) {
                            return Future->fail("Page title contains text '$1'") if $title->text =~ /(error|not found)/i;
                        }
                    }

 view all matches for this distribution


Embperl

 view release on metacpan or  search on metacpan

Changes.pod  view on Meta::CPAN

     automaticly set status to 301.
   - setting http headers and <META HTTP-EQUIV=..> now works also
     in cgi mode.
   - Session Handling now also works in CGI mode (needs
     Apache::Session >= 1.04)
   - ACTION attribute of Formtag is now URL en/decoded. Spotted by
     Hartmut Palm.

=head1 1.2b9 (BETA) 10. Sept 1999

   - Fixed a problem with loading Apache::Session 1.01, when

 view all matches for this distribution


Emoji-NationalFlag

 view release on metacpan or  search on metacpan

lib/Emoji/NationalFlag.pm  view on Meta::CPAN


=head2 code2flag($iso_3166_1_alpha_2_code): Optional[NationalFlagEmoji]

This method returns national flag emoji if the supplied code (case insensitive) is valid, otherwise returns C<undef>

=head2 flag2code($decoded_national_flag_emoji): Optional[lc(CountryCodeAlpha-2)]

This method returns lower case of ISO 3166-1 alpha-2 country code if the supplied emoji is valid, otherwise returns C<undef>

=head1 AUTHOR

 view all matches for this distribution


Encode-Argv

 view release on metacpan or  search on metacpan

lib/Encode/Argv.pm  view on Meta::CPAN

Encode::Argv - Automatically Mess With @ARGV's Encoding

=head1 SYNOPSIS

  use Encode::Argv ('cp932');
  # Now @ARGV is decoded unicode characters, decoded from cp932

  use Encode::Argv ('cp932' => 'euc-jp');
  # Now @ARGV is encoded into euc-jp after being decoded from cp932

  use Encode::Argv;
  # Now @ARGV is decoded from whatever Term::Encoding thinks you are
  # using on your terminal.

=head1 DESCRIPTION

I saw L<http://search.cpan.org/dist/Sjis|Sjis.pm> and L<http://www.aritia.org/hizumi/perl/perlwin.html|this>, and thought, "Well, I can't fix /all/ of their

 view all matches for this distribution


Encode-Base32-Crockford

 view release on metacpan or  search on metacpan

lib/Encode/Base32/Crockford.pm  view on Meta::CPAN


or

    use Encode::Base32::Crockford qw(base32_decode); # your choice of methods
    
    my $decoded = base32_decode_with_checksum("16JD");
    my $encoded = base32_encode_with_checksum(1234);

=head1 METHODS

=head2 base32_encode

 view all matches for this distribution


Encode-Base32-GMP

 view release on metacpan or  search on metacpan

lib/Encode/Base32/GMP.pm  view on Meta::CPAN

  base32hex: [0123456789ABCDEFGHIJKLMNOPQRSTUV]
  gmp:       [0123456789ABCDEFGHIJKLMNOPQRSTUV]

The encode_base32, decode_base32 and md5_base32 methods support an alphabet
parameter which can be set to the supported alphabets to indicate the value
to be encoded or decoded:

  [qw/crockford rfc4648 base32hex zbase32 gmp/]

This module functions similarly to L<Encode::Base58::GMP> with Base32 being
ideal for case-insensitive encoding and Base58 being ideal for case-sensitive

 view all matches for this distribution


Encode-Base58-BigInt

 view release on metacpan or  search on metacpan

lib/Encode/Base58/BigInt.pm  view on Meta::CPAN

sub decode_base58 {
    my $str = shift;
    $str =~ tr/0OlI/DD11/;
    $str =~ $reg or croak "Invalid Base58";

    my $decoded = Math::BigInt->new(0);
    my $multi   = Math::BigInt->new(1);
    my $base    = @$chars;

    while (length $str > 0) {
        my $digit = chop $str;
        $decoded->badd($multi->copy->bmul($map->{$digit}));
        $multi->bmul($base);
    }

    "$decoded";
}

1;
__END__

lib/Encode/Base58/BigInt.pm  view on Meta::CPAN

=head1 SYNOPSIS

  use Encode::Base58::BigInt;
  my $bigint  = '9235113611380768826';
  my $encoded = encode_base58($bigint);
  my $decoded = decode_base58($short); # decoded is bigint string


=head1 DESCRIPTION

Encode::Base58::BigInt is a base58 encoder/decoder implementation in Perl.

 view all matches for this distribution


Encode-Base58

 view release on metacpan or  search on metacpan

lib/Encode/Base58.pm  view on Meta::CPAN

}

sub decode_base58 {
    my $str = shift;

    my $decoded = 0;
    my $multi   = 1;
    my $base    = @alpha;

    while (length $str > 0) {
        my $digit = chop $str;
        $decoded += $multi * $alpha{$digit};
        $multi   *= $base;
    }

    return $decoded;
}

1;
__END__

 view all matches for this distribution


Encode

 view release on metacpan or  search on metacpan

Encode.pm  view on Meta::CPAN

Do not use it for data exchange.
Unless you want Perl's older "lax" mode, prefer
C<$string = decode("UTF-8", $octets [, CHECK])>.

Equivalent to C<$string = decode("utf8", $octets [, CHECK])>.
The sequence of octets represented by $octets is decoded
from (loose, not strict) utf8 into a sequence of logical characters.
Because not all sequences of octets are valid not strict utf8,
it is quite possible for this function to fail.
For CHECK, see L</"Handling Malformed Data">.

Encode.pm  view on Meta::CPAN


For encodings that are implemented by the C<Encode::XS> module, C<CHECK> C<==>
C<Encode::FB_PERLQQ> puts C<encode> and C<decode> into C<perlqq> fallback mode.

When you decode, C<\xI<HH>> is inserted for a malformed character, where
I<HH> is the hex representation of the octet that could not be decoded to
utf8.  When you encode, C<\x{I<HHHH>}> will be inserted, where I<HHHH> is
the Unicode code point (in any number of hex digits) of the character that
cannot be found in the character repertoire of the encoding.

The HTML/XML character reference modes are about the same. In place of

Encode.pm  view on Meta::CPAN


  $ascii = encode("ascii", $utf8, sub{ sprintf "<U+%04X>", shift });

Acts like C<FB_PERLQQ> but U+I<XXXX> is used instead of C<\x{I<XXXX>}>.

Fallback for C<decode> must return decoded string (sequence of characters)
and takes a list of ordinal values as its arguments. So for
example if you wish to decode octets as UTF-8, and use ISO-8859-15 as
a fallback for bytes that are not valid UTF-8, you could write

    $str = decode 'UTF-8', $octets, sub {

 view all matches for this distribution


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