view release on metacpan or search on metacpan
t/002-Spec-analysis.t view on Meta::CPAN
my $edi = Business::EDI->new('d08a') or die "Business::EDI->new('d08a') failed";
ok($perl = ordrsp_data, "DATA handle read and decode" );
$perl or die "DATA handle not decoded successfully";
# note("ref(\$obj): " . ref($perl));
# note(" \$obj : " . $perl );
$Data::Dumper::Indent = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
DirectConnect.pm view on Meta::CPAN
This method will return the value for an item returned from FedEx. Refer to
the C<Business::FedEx::Constants> %FE_RE hash to see all possible values.
=item $t->rbuf()
Returns the decoded string portion of the FedEx reply.
=item $t->hash_ret()
Returns a hash of the FedEx reply values
view all matches for this distribution
view release on metacpan or search on metacpan
zlib/contrib/blast/blast.c view on Meta::CPAN
* more "natural" ordering starting with all zeros and incrementing.
*/
local int decode(struct state *s, struct huffman *h)
{
int len; /* current number of bits in code */
int code; /* len bits being decoded */
int first; /* first code of length len */
int count; /* number of codes of length len */
int index; /* index of first code of length len in symbol table */
int bitbuf; /* bits from stream */
int left; /* bits left in next or left to process */
zlib/contrib/blast/blast.c view on Meta::CPAN
*/
local int decomp(struct state *s)
{
int lit; /* true if literals are coded */
int dict; /* log2(dictionary size) - 6 */
int symbol; /* decoded symbol, extra bits for distance */
int len; /* length for copy */
unsigned dist; /* distance for copy */
int copy; /* copy counter */
unsigned char *from, *to; /* copy pointers */
static int virgin = 1; /* build tables once */
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/MollieAPI.pm view on Meta::CPAN
my $self = shift;
my $req = shift;
$req->header('Authorization', 'Bearer ' . $self->api_key);
my $ua = LWP::UserAgent->new();
my $res = $ua->request($req);
my $data = decode_json($res->decoded_content);
$self->log_response({ request => $req, response => $res });
return $data;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/Mondo/Client.pm view on Meta::CPAN
Make a request to the Mondo API:
my $data = $Client->api_get( 'location',\%params );
May return a the decoded response data as a hash/array/string depending
on the reposonse type
=cut
sub api_get {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/Monzo/Client.pm view on Meta::CPAN
Make a request to the Monzo API:
my $data = $Client->api_get( 'location',\%params );
May return a the decoded response data as a hash/array/string depending
on the reposonse type
=cut
sub api_get {
view all matches for this distribution
view release on metacpan or search on metacpan
my $paircodeResponse = '{"data":[{"policies":[{"policy":"id", "method":"require", "params":["TfLAXsWtvWpSgqMYjJ1QvJEx2Bdob1mDeK4"]}], "resource":"Gd1q7mZJQU5zGoHAFsh1bmYEcWYQnzHZW6sjWatxtEr2", "token":"9nYwJ7KRRAcH1rXwJZRonXYrJJjcwAUowTC63UVLSYaC...
my $invoiceResponse = '{"facade":"pos/invoice", "data": {"url":"https://paul.bp:8088/invoice?id=FAdAZK8FwmHyUZSzRvT9GW", "status":"new", "btcPrice":"0.035314", "btcDue":"0.035314", "price":10, "currency":"USD", "exRates":{"USD":283.1700000000001}...
my $getTokens = '{"data": [{"pos/invoice":"7zjXTgeWaTj7xXNBA1qV7iBGGHJZNiLjPXNquHdk8BUN"}, {"pos":"HwC497kDGihPFUDiPfbedj6etbrVHyKQaiFHPGspYHHV"}]}';
my $httpd = run_http_server {
my $request = shift;
my $decoded = decode_json($request->content) if $request->content;
my $uri = $request->uri;
my $method = $request->method;
if ($uri->path eq '/postthis') {
}
return do {
if ($method eq "POST") {
if( $uri->path eq '/postthis' && $decoded->{"token"} && $decoded->{"facade"} ) {
[
200,
[ 'Content-Type' => 'application/json' ],
[ '{"facade":"correct", "token":"correct"}']
]
} elsif( $decoded->{"pairingCode"} && $uri->path eq '/tokens' ) {
[
200,
[ 'Content-Type' => 'application/json' ],
[ $paircodeResponse ]
]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/OnlinePayment/IPayment/Response.pm view on Meta::CPAN
}
=head3 raw_url
Accessor for the raw, undecoded url (used for the checksum).
=cut
has raw_url => (is => 'rw');
=head3 url_is_valid($raw_undecoded_url)
You may ask for the validation of the url, which comes with a checksum
attached. For this you should have already provided the security key
and you should pass the raw undecoded url as argument.
Alternatively, if you set the attribute C<raw_url> in the constructor
or with the accessor, you can call url_is_valid without arguments.
Return false on failure, true on success
view all matches for this distribution
view release on metacpan or search on metacpan
InternetSecure.pm view on Meta::CPAN
=head2 Character encoding
When using non-ASCII characters, all data provided to B<contents>() should
have been decoded beforehand via the C<Encode> module, unless your data is in
ISO-8859-1 and you haven't meddled with the C<encoding> pragma. (Please
don't.)
InternetSecure currently does not handle characters outside of ISO-8859-1, so
these will be replaced with C<?> before being transmitted.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/PayPoint/MCPE.pm view on Meta::CPAN
# use Data::Dumper; print STDERR Dumper(\$resp);
unless ($resp->is_success) {
return wantarray ? (error => $resp->status_line) : { error => $resp->status_line };
}
my @parts = split('&', $resp->decoded_content);
my %parts;
foreach my $p (@parts) {
my ($a, $b) = split('=', $p, 2);
$a =~ s/^(int|flt|str|dat)//;
$parts{$a} = uri_unescape($b);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/Stripe/Webhook.pm view on Meta::CPAN
my $error = $webhook->error();
=head2 process
This method processes the webhook sent from Stripe. It checks the Stripe Signature if a C<signing_secret> parameter has been included and calls the defined subroutine to handle the Stripe event. Each subroutine is passed a JSON decoded Event Object...
my $result = $webhook->process();
This method takes no parameters.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/Tax/VAT/Validation.pm view on Meta::CPAN
$request->content(_in_soap_envelope($vatNumber, $countryCode));
$request->content_type("text/xml; charset=utf-8");
my $response = $ua->request($request);
return $countryCode . '-' . $vatNumber if $self->_is_res_ok( $response->code, $response->decoded_content );
}
sub _check_hmrc {
my ($self, $vatNumber, $countryCode) = @_;
my $ua = $self->_get_ua();
my $request = HTTP::Request->new(GET => $self->{hmrc_baseurl}.$vatNumber);
$request->header(Accept => 'application/vnd.hmrc.1.0+json');
my $response = $ua->request($request);
$self->{res} = $response->decoded_content;
if ($response->code == 200) {
my $data = decode_json($self->{res});
$self->{information}->{name} = $data->{target}->{name};
my $line = 1;
my $address = "";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/YQL.pm view on Meta::CPAN
=back
=head2 q
Submits the YQL query, this method simply takes a string to send to Y! API, and returns the decoded JSON response n the form of a Perl object if the request was valid.
q("SELECT * from geo.places WHERE text='SFO'")
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/cXML.pm view on Meta::CPAN
$self->{remote},
'Content-Type' => 'text/xml; charset="UTF-8"',
'Content' => $req,
);
if ($res->is_success) {
$res = $res->decoded_content;
my $msg = new Business::cXML::Transmission $res;
unless (defined blessed($msg)) {
# We have an error status code
return $self->_warning('send(21) ' . ($msg->[0] == 406 ? 'response XML validation' : 'response cXML traversal') . ' failure', $res);
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/eWAY/RapidAPI.pm view on Meta::CPAN
# print '<h2>POST Error: ' . $resp->status_line . ' URL: ' . $url. ' </h2> <pre>';
# die Dumper(\$resp);
}
return $resp->decoded_content;
}
no Moo;
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/iDEAL/Adyen.pm view on Meta::CPAN
sub banklist {
my $self = shift;
my $res = $self->{_ua}->get($self->_url('banklist'));
if ($res->is_success) {
return $self->_parse_xml($res->decoded_content)->{'bank'};
} else {
$self->{_error} = $res->status_line;
return undef;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/iDEAL/Mollie.pm view on Meta::CPAN
sub banklist {
my $self = shift;
my $res = $self->{'_ua'}->get($self->{'_baseurl'}.'?a=banklist');
if ($res->is_success) {
return _parse_output($res->decoded_content)->{'bank'};
} else {
$self->{'_error'} = $res->status_line;
}
}
lib/Business/iDEAL/Mollie.pm view on Meta::CPAN
# Put the action value in $parms
$parms->{'a'} = 'fetch';
my $res = $self->{'_ua'}->post($self->{'_baseurl'}, $parms);
if ($res->is_success) {
return _parse_output($res->decoded_content)->{'order'};
} else {
$self->{'_error'} = $res->status_line;
}
}
lib/Business/iDEAL/Mollie.pm view on Meta::CPAN
# Put the action value in $parms
$parms->{'a'} = 'check';
my $res = $self->{'_ua'}->post($self->{'_baseurl'}, $parms);
if ($res->is_success) {
return _parse_output($res->decoded_content)->{'order'};
} else {
$self->{'_error'} = $res->status_line;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/samples.t view on Meta::CPAN
{ filename => 'googlejp.atom',
exp_num => 25,
exp_partial => [
sh( id => '1404701402|tag:blogger.com,1999:blog-20042392.post-2515664455683743324',
## status text should be decoded.
text => 'ãããããããã¡ãããã©ããã§ãããªããã©ããªé£éããã§ãã¯ãã¾ãããã',
## if there are multiple <link>s, use rel="alternate".
busybird => sh( status_permalink => 'http://feedproxy.google.com/~r/GoogleJapanBlog/~3/RP_M-WXr_6I/blog-post.html',
original => sh( id => 'tag:blogger.com,1999:blog-20042392.post-2515664455683743324' )),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BusyBird/Main.pm view on Meta::CPAN
=head2 $timeline = $main->timeline($name)
Returns the C<$timeline> whose name is C<$name> from the C<$main>.
C<$timeline> is a L<BusyBird::Timeline> object.
If C<$name> includes Unicode characters, it must be a character string (decoded string), not a binary string (encoded string).
If there is no timeline named C<$name> in C<$main>, a new timeline is created, installed and returned.
In L<BusyBird::Main>, timeline names must not contain a slash "/", because it confuses Web API.
If C<$name> contains a slash, the timeline IS created and returned, but it's NOT installed in the C<$main> object.
view all matches for this distribution
view release on metacpan or search on metacpan
t/26-oo_public.t view on Meta::CPAN
my $random = Bytes::Random::Secure->new( Bits => 64, NonBlocking=>1, Weak=>1 );
is( length $random->bytes(10), 10, 'bytes(10) returns ten bytes.' );
is( length decode_base64($random->bytes_base64(111)), 111,
'decode_base64() can be decoded, and returns correct number of bytes.');
like( $random->bytes_base64(111,"\n\n"), qr/\n\n/,
'bytes_base64(111,"\n\n"): EOL handled properly.' );
is( length decode_qp( $random->bytes_qp(200) ), 200,
'bytes_qp(): Decodable Quoted Printable returned.'
view all matches for this distribution
view release on metacpan or search on metacpan
src/sparse-0.4.4/perl/t/include/disas/bfd.h view on Meta::CPAN
int bytes_per_chunk;
enum bfd_endian display_endian;
/* Results from instruction decoders. Not all decoders yet support
this information. This info is set each time an instruction is
decoded, and is only valid for the last such instruction.
To determine whether this decoder supports this information, set
insn_info_valid to 0, decode an instruction, then check it. */
char insn_info_valid; /* Branch info has been set. */
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CAM/PDF.pm view on Meta::CPAN
}
$self->fixDecode(\$streamdata, $filtername, shift @parms);
my $length = length $streamdata;
#warn "decoded length: $oldlength -> $length\n";
if ($save)
{
my $objnum = $dict->{StreamData}->{objnum};
my $gennum = $dict->{StreamData}->{gennum};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CBOR/Free.pm view on Meta::CPAN
This is probably what you want if you
follow the receive-decode-process-encode-output workflow that
L<perlunitut> recommends (which you might be doing via C<use utf8>)
B<AND> if you intend for your CBOR to contain exclusively text.
Think of this option as: âAll my strings are decoded.â
(Perl internals note: if !SvUTF8, the CBOR will be the UTF8-upgraded
version.)
=item * C<as_text>: Treats all strings as octets of UTF-8.
lib/CBOR/Free.pm view on Meta::CPAN
Notes on mapping CBOR to Perl:
=over
=item * C<decode()> decodes CBOR text strings as UTF-8-decoded Perl strings.
CBOR binary strings become undecoded Perl strings.
(See L<CBOR::Free::Decoder> and L<CBOR::Free::SequenceDecoder> for more
character-decoding options.)
Notes:
lib/CBOR/Free.pm view on Meta::CPAN
L<CBOR::Free::Decoder> and L<CBOR::Free::SequenceDecoder> if you want
to tolerate invalid UTF-8.)
=item * You can reliably use C<utf8::is_utf8()> to determine if a given Perl
string came from CBOR text or binary, but B<ONLY> if you test the scalar as
it appears in the newly-decoded data structure itself. Generally Perl code
should avoid C<is_utf8()>, but with CBOR::Free-created strings this limited
use case is legitimate and potentially gainful.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CBOR/PP/Decode.pm view on Meta::CPAN
=over
=item * All tags are ignored. (This could be iterated on later.)
=item * Indefinite-length objects are supported, but streamed parsing
is not; the data structure must be complete to be decoded.
=item * CBOR text strings are decoded to UTF8-flagged strings, while
binary strings are decoded to non-UTF8-flagged strings. In practical
terms, this means that a decoded CBOR binary string will have no code point
above 255, while a decoded CBOR text string can contain any valid Unicode
code point.
=item * null, undefined, true, and false become undef, undef,
Types::Serialiser::true(), and Types::Serialiser::false(), respectively.
(NB: undefined is deserialized as an error object in L<CBOR::XS>,
view all matches for this distribution
view release on metacpan or search on metacpan
# prefix decoding
my $many_cbor_strings = ...;
while (length $many_cbor_strings) {
my ($data, $length) = $cbor->decode_prefix ($many_cbor_strings);
# data was decoded
substr $many_cbor_strings, 0, $length, ""; # remove decoded cbor string
}
=head1 DESCRIPTION
This module converts Perl data structures to the Concise Binary Object
reference to the earlier value.
This means that such values will only be encoded once, and will not result
in a deep cloning of the value on decode, in decoders supporting the value
sharing extension. This also makes it possible to encode cyclic data
structures (which need C<allow_cycles> to be enabled to be decoded by this
module).
It is recommended to leave it off unless you know your
communication partner supports the value sharing extensions to CBOR
(L<http://cbor.schmorp.de/value-sharing>), as without decoder support, the
If C<$enable> is false (the default), then C<encode> will encode shared
data structures repeatedly, unsharing them in the process. Cyclic data
structures cannot be encoded in this mode.
This option does not affect C<decode> in any way - shared values and
references will always be decoded properly if present.
=item $cbor = $cbor->allow_cycles ([$enable])
=item $enabled = $cbor->get_allow_cycles
If C<$enable> is true (or missing), then C<decode> will happily decode
self-referential (cyclic) data structures. By default these will not be
decoded, as they need manual cleanup to avoid memory leaks, so code that
isn't prepared for this will not leak memory.
If C<$enable> is false (the default), then C<decode> will throw an error
when it encounters a self-referential/cyclic data structure.
If C<$enable> is false (the default), then C<encode> will encode strings
the standard CBOR way.
This option does not affect C<decode> in any way - string references will
always be decoded properly if present.
=item $cbor = $cbor->text_keys ([$enable])
=item $enabled = $cbor->get_text_keys
Sets or replaces the tagged value decoding filter (when C<$cb> is
specified) or clears the filter (if no argument or C<undef> is provided).
The filter callback is called only during decoding, when a non-enforced
tagged value has been decoded (see L<TAG HANDLING AND EXTENSIONS> for a
list of enforced tags). For specific tags, it's often better to provide a
default converter using the C<%CBOR::XS::FILTER> hash (see below).
The first argument is the numerical tag, the second is the (decoded) value
that has been tagged.
The filter function should return either exactly one value, which will
replace the tagged value in the decoded data structure, or no values,
which will result in default handling, which currently means the decoder
creates a C<CBOR::XS::Tagged> object to hold the tag and the value.
When the filter is cleared (the default state), the default filter
function, C<CBOR::XS::default_filter>, is used. This function simply
The following methods help with this:
=over 4
=item @decoded = $cbor->incr_parse ($buffer)
This method attempts to decode exactly one CBOR value from the beginning
of the given C<$buffer>. The value is removed from the C<$buffer> on
success. When C<$buffer> doesn't contain a complete value yet, it returns
nothing. Finally, when the C<$buffer> doesn't start with something
that could ever be a valid CBOR value, it raises an exception, just as
C<decode> would. In the latter case the decoder state is undefined and
must be reset before being able to parse further.
This method modifies the C<$buffer> in place. When no CBOR value can be
decoded, the decoder stores the current string offset. On the next call,
continues decoding at the place where it stopped before. For this to make
sense, the C<$buffer> must begin with the same octets as on previous
unsuccessful calls.
You can call this method in scalar context, in which case it either
returns a decoded value or C<undef>. This makes it impossible to
distinguish between CBOR null values (which decode to C<undef>) and an
unsuccessful decode, which is often acceptable.
=item @decoded = $cbor->incr_parse_multiple ($buffer)
Same as C<incr_parse>, but attempts to decode as many CBOR values as
possible in one go, instead of at most one. Calls to C<incr_parse> and
C<incr_parse_multiple> can be interleaved.
Byte strings will become octet strings in Perl (the Byte values 0..255
will simply become characters of the same value in Perl).
=item UTF-8 strings
UTF-8 strings in CBOR will be decoded, i.e. the UTF-8 octets will be
decoded into proper Unicode code points. At the moment, the validity of
the UTF-8 octets will not be validated - corrupt input will result in
corrupted Perl strings.
=item arrays, maps
If an object supports neither C<TO_CBOR> nor C<FREEZE>, encoding will fail
with an error.
=head3 DECODING
Objects encoded via C<TO_CBOR> cannot (normally) be automatically decoded,
but objects encoded via C<FREEZE> can be decoded using the following
protocol:
When an encoded CBOR perl object is encountered by the decoder, it will
look up the C<THAW> method, by using the stored classname, and will fail
if the method cannot be found.
CBOR::XS::Tagged object on decoding, and only encoding the tag when
explicitly requested).
Tags not handled specifically are currently converted into a
L<CBOR::XS::Tagged> object, which is simply a blessed array reference
consisting of the numeric tag value followed by the (decoded) CBOR value.
Future versions of this module reserve the right to special case
additional tags (such as base64url).
=head2 ENFORCED TAGS
=over 4
=item 26 (perl-object, L<http://cbor.schmorp.de/perl-object>)
These tags are automatically created (and decoded) for serialisable
objects using the C<FREEZE/THAW> methods (the L<Types::Serialier> object
serialisation protocol). See L<OBJECT SERIALISATION> for details.
=item 28, 29 (shareable, sharedref, L<http://cbor.schmorp.de/value-sharing>)
These tags are automatically decoded when encountered (and they do not
result in a cyclic data structure, see C<allow_cycles>), resulting in
shared values in the decoded object. They are only encoded, however, when
C<allow_sharing> is enabled.
Not all shared values can be successfully decoded: values that reference
themselves will I<currently> decode as C<undef> (this is not the same
as a reference pointing to itself, which will be represented as a value
that contains an indirect reference to itself - these will be decoded
properly).
Note that considerably more shared value data structures can be decoded
than will be encoded - currently, only values pointed to by references
will be shared, others will not. While non-reference shared values can be
generated in Perl with some effort, they were considered too unimportant
to be supported in the encoder. The decoder, however, will decode these
values as shared values.
=item 256, 25 (stringref-namespace, stringref, L<http://cbor.schmorp.de/stringref>)
These tags are automatically decoded when encountered. They are only
encoded, however, when C<pack_strings> is enabled.
=item 22098 (indirection, L<http://cbor.schmorp.de/indirection>)
This tag is automatically generated when a reference are encountered (with
=over 4
=item 0, 1 (date/time string, seconds since the epoch)
These tags are decoded into L<Time::Piece> objects. The corresponding
C<Time::Piece::TO_CBOR> method always encodes into tag 1 values currently.
The L<Time::Piece> API is generally surprisingly bad, and fractional
seconds are only accidentally kept intact, so watch out. On the plus side,
the module comes with perl since 5.10, which has to count for something.
=item 2, 3 (positive/negative bignum)
These tags are decoded into L<Math::BigInt> objects. The corresponding
C<Math::BigInt::TO_CBOR> method encodes "small" bigints into normal CBOR
integers, and others into positive/negative CBOR bignums.
=item 4, 5, 264, 265 (decimal fraction/bigfloat)
Both decimal fractions and bigfloats are decoded into L<Math::BigFloat>
objects. The corresponding C<Math::BigFloat::TO_CBOR> method I<always>
encodes into a decimal fraction (either tag 4 or 264).
NaN and infinities are not encoded properly, as they cannot be represented
in CBOR.
See L<BIGNUM SECURITY CONSIDERATIONS> for more info.
=item 30 (rational numbers)
These tags are decoded into L<Math::BigRat> objects. The corresponding
C<Math::BigRat::TO_CBOR> method encodes rational numbers with denominator
C<1> via their numerator only, i.e., they become normal integers or
C<bignums>.
See L<BIGNUM SECURITY CONSIDERATIONS> for more info.
CBOR implements some extra hints and support for JSON interoperability,
and the spec offers further guidance for conversion between CBOR and
JSON. None of this is currently implemented in CBOR, and the guidelines
in the spec do not result in correct round-tripping of data. If JSON
interoperability is improved in the future, then the goal will be to
ensure that decoded JSON data will round-trip encoding and decoding to
CBOR intact.
=head1 SECURITY CONSIDERATIONS
This section contains some random implementation notes. They do not
describe guaranteed behaviour, but merely behaviour as-is implemented
right now.
64 bit integers are only properly decoded when Perl was built with 64 bit
support.
Strings and arrays are encoded with a definite length. Hashes as well,
unless they are tied (or otherwise magical).
On perls that were built without 64 bit integer support (these are rare
nowadays, even on 32 bit architectures, as all major Perl distributions
are built with 64 bit integer support), support for any kind of 64 bit
value in CBOR is very limited - most likely, these 64 bit values will
be truncated, corrupted, or otherwise not decoded correctly. This also
includes string, float, array and map sizes that are stored as 64 bit
integers.
=head1 THREADS
view all matches for this distribution
view release on metacpan or search on metacpan
my $keyPair = shift; die 'wrong type '.ref($keyPair).' for $keyPair' if defined $keyPair && ref $keyPair ne 'CDS::KeyPair';
my $response = $o->request('GET', $o->{url}.'/objects/'.$hash->hex, HTTP::Headers->new);
return if $response->code == 404;
return undef, 'get ==> HTTP '.$response->status_line if ! $response->is_success;
return CDS::Object->fromBytes($response->decoded_content(charset => 'none'));
}
sub put {
my $o = shift;
my $hash = shift; die 'wrong type '.ref($hash).' for $hash' if defined $hash && ref $hash ne 'CDS::Hash';
my $headers = HTTP::Headers->new;
$headers->header('Condensation-Watch' => $timeout.' ms') if $timeout > 0;
my $needsSignature = $boxLabel ne 'public';
my $response = $o->request('GET', $boxUrl, $headers, $keyPair, undef, $needsSignature);
return undef, 'list ==> HTTP '.$response->status_line if ! $response->is_success;
my $bytes = $response->decoded_content(charset => 'none');
if (length($bytes) % 32 != 0) {
print STDERR 'old procotol', "\n";
my $hashes = [];
for my $line (split /\n/, $bytes) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Demo/Ajax.pm view on Meta::CPAN
=over 4
=item Control passes to search_callback(), the call-back function
=item The data is decoded from JSON to text by a YAHOO.lang.JSON object
=item The data is moved into a YAHOO.util.LocalDataSource object
=item The data is formatted as it's moved into a YAHOO.widget.DataTable object
view all matches for this distribution
view release on metacpan or search on metacpan
t/90_component.t view on Meta::CPAN
subtest 'Check HTTP UserAgent' => sub {
my @requests = $fake_user_agent->get_all_requests();
my @structs = map {
decode_json( $_->decoded_content )
} @requests;
my $span_data = $structs[-1];
cmp_deeply(
$span_data => [[
superhashof {
view all matches for this distribution
view release on metacpan or search on metacpan
AuthRegister.pm view on Meta::CPAN
use HTTP::Request::Common qw(POST);
my $req = POST $casurl, [ rt=>'verify', username=>$username, stoken=>$stoken ];
my $resp = $ua->request($req);
my $result = 'fail';
if ($resp->is_success) {
my $message = $resp->decoded_content; $message =~ s/\s//g;
if ($message eq 'answer:ok') { $result = 'ok'; &_dbg383; }
else { $Error.=" message=($message);" }
} else {
$Error.= "HTTP POST error code: ". $resp->code. "\n".
"HTTP POST error message: ".$resp->message."\n";
view all matches for this distribution
view release on metacpan or search on metacpan
Thanks to Britton Kerin and Yanick Campoux. (RT#43587)
10.hidden() now correctly supports multiple default values.
Thanks to david@dierauer.net and Russell Jenkins. (RT#20436)
11.Calling CGI->new() no longer clobbers the value of $_ in the current scope.
Thanks to Alexey Tourbin, Bob Kuo and Mark Stosberg. (RT#25131)
12.UTF-8 params should not get double-decoded now.
Thanks to Yves, Bodo, Burak G�rsoy, and Michael Schout. (RT#19913)
13.We now give objects passed to CGI::Carp::die a chance to be stringified.
Thanks to teek and Yanick Champoux (RT#41530)
14.Turning off autoEscape() now only affects the behavior of built-in HTML
generation fuctions. Explicit calls to escapeHTML() always escape HTML regardless
view all matches for this distribution