view release on metacpan or search on metacpan
lib/Crypt/RSA.pm view on Meta::CPAN
1;
=pod
=encoding utf8
=head1 NAME
Crypt::RSA - RSA public-key cryptosystem.
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
require 5.008001; use strict; use warnings; use utf8;
use lib 'inc';
use ExtUtils::MakeMaker;
use Inline::Module;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alt/Digest/MD5/OpenSSL.pm view on Meta::CPAN
1;
=pod
=encoding utf8
=head1 NAME
Alt::Digest::MD5::OpenSSL - Alternative Digest::MD5 based on OpenSSL.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Pegex/Compiler.pm view on Meta::CPAN
}
sub to_json {
require JSON::XS;
my $self = shift;
return JSON::XS->new->utf8->canonical->pretty->encode($self->tree);
}
sub to_perl {
my $self = shift;
require Data::Dumper;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alt/Lexical/Var/ButSupportModernPerl.pm view on Meta::CPAN
1;
=pod
=encoding utf8
=head1 NAME
Alt::Lexical::Var::ButSupportModernPerl - alternative distribution of Lexical::Var, with support for more modern versions of Perl
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Capture/Tiny.pm view on Meta::CPAN
_open \*STDIN, "<" . File::Spec->devnull;
# _debug( "# proxied STDIN as " . (defined fileno STDIN ? fileno STDIN : 'undef' ) . "\n" );
_open $dup{stdin} = IO::Handle->new, "<&=STDIN";
}
$proxies{stdin} = \*STDIN;
binmode(STDIN, ':utf8') if $] >= 5.008;
}
if ( ! defined fileno STDOUT ) {
$proxy_count{stdout}++;
if (defined $dup{stdout}) {
_open \*STDOUT, ">&=" . fileno($dup{stdout});
inc/Capture/Tiny.pm view on Meta::CPAN
_open \*STDOUT, ">" . File::Spec->devnull;
# _debug( "# proxied STDOUT as " . (defined fileno STDOUT ? fileno STDOUT : 'undef' ) . "\n" );
_open $dup{stdout} = IO::Handle->new, ">&=STDOUT";
}
$proxies{stdout} = \*STDOUT;
binmode(STDOUT, ':utf8') if $] >= 5.008;
}
if ( ! defined fileno STDERR ) {
$proxy_count{stderr}++;
if (defined $dup{stderr}) {
_open \*STDERR, ">&=" . fileno($dup{stderr});
inc/Capture/Tiny.pm view on Meta::CPAN
_open \*STDERR, ">" . File::Spec->devnull;
# _debug( "# proxied STDERR as " . (defined fileno STDERR ? fileno STDERR : 'undef' ) . "\n" );
_open $dup{stderr} = IO::Handle->new, ">&=STDERR";
}
$proxies{stderr} = \*STDERR;
binmode(STDERR, ':utf8') if $] >= 5.008;
}
return %proxies;
}
sub _unproxy {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alt/Module/Runtime/ButEUMM.pm view on Meta::CPAN
1;
=pod
=encoding utf8
=head1 NAME
Alt::Module::Runtime::ButEUMM - alternative distribution of Module::Runtime, using ExtUtils::MakeMaker
view all matches for this distribution
view release on metacpan or search on metacpan
0.04 Mon Jul 28 07:14:27 PDT 2014
- Switch to Zilla-Dist
0.03 Thu Jul 26 11:03:45 PDT 2012
- Add utf8 pod encoding
0.02 Wed Jul 25 20:50:25 PDT 2012
- no_index Sex.pm
0.01 Wed Jul 25 16:52:30 PDT 2012
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alt/Template/Plugin/JSON/Moo.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:JWRIGHT';
our $VERSION = '0.04';
=pod
=encoding utf8
=head1 NAME
Alt::Template::Plugin::JSON::Moo - Alternate Template::Plugin::JSON - using Moo
view all matches for this distribution
view release on metacpan or search on metacpan
t/20button.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use Test::More;
use Tickit::Test;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alt/common/sense/TOBYINK.pm view on Meta::CPAN
=head1 DESCRIPTION
Importing L<common::sense> is roughly equivalent to:
use utf8;
use strict qw(vars subs);
use feature qw(say state switch);
use feature qw(unicode_strings current_sub fc evalbytes);
no feature qw(array_base);
no warnings;
view all matches for this distribution
view release on metacpan or search on metacpan
PERL_MAGIC_sv|5.007002||p
PERL_MAGIC_taint|5.007002||p
PERL_MAGIC_tiedelem|5.007002||p
PERL_MAGIC_tiedscalar|5.007002||p
PERL_MAGIC_tied|5.007002||p
PERL_MAGIC_utf8|5.008001||p
PERL_MAGIC_uvar_elem|5.007003||p
PERL_MAGIC_uvar|5.007002||p
PERL_MAGIC_vec|5.007002||p
PERL_MAGIC_vstring|5.008001||p
PERL_QUAD_MAX|5.004000||p
SvPVbyte_force||5.009002|
SvPVbyte_nolen||5.006000|
SvPVbytex_force||5.006000|
SvPVbytex||5.006000|
SvPVbyte|5.006000||p
SvPVutf8_force||5.006000|
SvPVutf8_nolen||5.006000|
SvPVutf8x_force||5.006000|
SvPVutf8x||5.006000|
SvPVutf8||5.006000|
SvPVx|||
SvPV|||
SvREFCNT_dec|||
SvREFCNT_inc_NN|5.009004||p
SvREFCNT_inc_simple_NN|5.009004||p
block_start|||
boolSV|5.004000||p
boot_core_PerlIO|||
boot_core_UNIVERSAL|||
boot_core_xsutils|||
bytes_from_utf8||5.007001|
bytes_to_uni|||n
bytes_to_utf8||5.006001|
call_argv|5.006000||p
call_atexit||5.006000|
call_list||5.004000|
call_method|5.006000||p
call_pv|5.006000||p
do_spawn|||
do_sprintf|||
do_sv_dump||5.006000|
do_sysseek|||
do_tell|||
do_trans_complex_utf8|||
do_trans_complex|||
do_trans_count_utf8|||
do_trans_count|||
do_trans_simple_utf8|||
do_trans_simple|||
do_trans|||
do_vecget|||
do_vecset|||
do_vop|||
hv_store_flags||5.008000|
hv_stores|5.009004||p
hv_store|||
hv_undef|||
ibcmp_locale||5.004000|
ibcmp_utf8||5.007003|
ibcmp|||
incl_perldb|||
incline|||
incpush_if_exists|||
incpush|||
is_uni_space||5.006000|
is_uni_upper_lc||5.006000|
is_uni_upper||5.006000|
is_uni_xdigit_lc||5.006000|
is_uni_xdigit||5.006000|
is_utf8_alnumc||5.006000|
is_utf8_alnum||5.006000|
is_utf8_alpha||5.006000|
is_utf8_ascii||5.006000|
is_utf8_char_slow|||n
is_utf8_char||5.006000|
is_utf8_cntrl||5.006000|
is_utf8_common|||
is_utf8_digit||5.006000|
is_utf8_graph||5.006000|
is_utf8_idcont||5.008000|
is_utf8_idfirst||5.006000|
is_utf8_lower||5.006000|
is_utf8_mark||5.006000|
is_utf8_print||5.006000|
is_utf8_punct||5.006000|
is_utf8_space||5.006000|
is_utf8_string_loclen||5.009003|
is_utf8_string_loc||5.008001|
is_utf8_string||5.006001|
is_utf8_upper||5.006000|
is_utf8_xdigit||5.006000|
isa_lookup|||
items|||n
ix|||n
jmaybe|||
join_exact|||
magic_setpos|||
magic_setregexp|||
magic_setsig|||
magic_setsubstr|||
magic_settaint|||
magic_setutf8|||
magic_setuvar|||
magic_setvec|||
magic_set|||
magic_sizepack|||
magic_wipepack|||
my_swabn|||n
my_swap|||
my_unexec|||
my_vsnprintf||5.009004|n
my|||
need_utf8|||n
newANONATTRSUB||5.006000|
newANONHASH|||
newANONLIST|||
newANONSUB|||
newASSIGNOP|||
sv_2nv|||
sv_2pv_flags||5.007002|
sv_2pv_nolen|5.006000||p
sv_2pvbyte_nolen|||
sv_2pvbyte|5.006000||p
sv_2pvutf8_nolen||5.006000|
sv_2pvutf8||5.006000|
sv_2pv|||
sv_2uv_flags||5.009001|
sv_2uv|5.004000||p
sv_add_arena|||
sv_add_backref|||
sv_insert|||
sv_isa|||
sv_isobject|||
sv_iv||5.005000|
sv_kill_backrefs|||
sv_len_utf8||5.006000|
sv_len|||
sv_magicext||5.007003|
sv_magic|||
sv_mortalcopy|||
sv_ncmp|||
sv_pvbyte||5.006000|
sv_pvn_force_flags||5.007002|
sv_pvn_force|||p
sv_pvn_nomg|5.007003||p
sv_pvn|5.005000||p
sv_pvutf8n_force||5.006000|
sv_pvutf8n||5.006000|
sv_pvutf8||5.006000|
sv_pv||5.006000|
sv_recode_to_utf8||5.007003|
sv_reftype|||
sv_release_COW|||
sv_release_IVX|||
sv_replace|||
sv_report_used|||
sv_untaint||5.004000|
sv_upgrade|||
sv_usepvn_flags||5.009004|
sv_usepvn_mg|5.004050||p
sv_usepvn|||
sv_utf8_decode||5.006000|
sv_utf8_downgrade||5.006000|
sv_utf8_encode||5.006000|
sv_utf8_upgrade_flags||5.007002|
sv_utf8_upgrade||5.007001|
sv_uv|5.005000||p
sv_vcatpvf_mg|5.006000|5.004000|p
sv_vcatpvfn||5.004000|
sv_vcatpvf|5.006000|5.004000|p
sv_vsetpvf_mg|5.006000|5.004000|p
to_uni_lower||5.007003|
to_uni_title_lc||5.006000|
to_uni_title||5.007003|
to_uni_upper_lc||5.006000|
to_uni_upper||5.007003|
to_utf8_case||5.007003|
to_utf8_fold||5.007003|
to_utf8_lower||5.007003|
to_utf8_substr|||
to_utf8_title||5.007003|
to_utf8_upper||5.007003|
token_free|||
token_getmad|||
tokenize_use|||
tokeq|||
tokereport|||
unshare_hek|||
unsharepvn||5.004000|
unwind_handler_stack|||
upg_version||5.009000|
usage|||
utf16_to_utf8_reversed||5.006001|
utf16_to_utf8||5.006001|
utf8_distance||5.006000|
utf8_hop||5.006000|
utf8_length||5.007001|
utf8_mg_pos_cache_update|||
utf8_to_bytes||5.006001|
utf8_to_uvchr||5.007001|
utf8_to_uvuni||5.007001|
utf8n_to_uvchr|||
utf8n_to_uvuni||5.007001|
utilize|||
uvchr_to_utf8_flags||5.007003|
uvchr_to_utf8|||
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
#if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL)
char *
DPPP_(my_sv_2pvbyte)(pTHX_ register SV *sv, STRLEN *lp)
{
sv_utf8_downgrade(sv,0);
return SvPV(sv,*lp);
}
#endif
#ifndef PERL_MAGIC_vec
# define PERL_MAGIC_vec 'v'
#endif
#ifndef PERL_MAGIC_utf8
# define PERL_MAGIC_utf8 'w'
#endif
#ifndef PERL_MAGIC_substr
# define PERL_MAGIC_substr 'x'
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/URLs.pm view on Meta::CPAN
use POSIX;
use Encode;
use URI;
# encoding pragmas follow any includes like "use"
use encoding 'utf8';
use open ':utf8';
# return 32-bit unsigned
sub easyhash32
{
my $string = shift;
Encode::_utf8_off($string);
my $dig = md5_hex($string);
# print $dig . " \n";
return POSIX::strtol(substr($dig,0,8),16);
}
# return 64-bit unsigned
sub easyhash64char
{
my $string = shift;
Encode::_utf8_off($string);
my $dig = md5_hex($string);
# print $dig . " \n";
return substr($dig,0,16);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/Buffer.pm view on Meta::CPAN
use strict;
use warnings;
use Time::Simple;
use encoding 'utf8';
use open ':utf8';
binmode STDIN, ":utf8";
binmode STDERR, ":utf8";
our $VERSION = '0.10';
=head1 NAME
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/NLPPlatform.pm view on Meta::CPAN
$rec = $records[$i];
($id,$docR)=@$rec;
warn "Process document $id\n";
open FILETMP_OUT, ">$tmpfile";
binmode(FILETMP_OUT, ":utf8");
# binmode(FILETMP_OUT);
# print FILETMP_OUT Encode::decode_utf8($doc);
Alvis::NLPPlatform::platform_reset();
$render_time = Alvis::NLPPlatform::standalone_main($config, $docR, \*FILETMP_OUT, 1); #${$tab_docs_xml->[$doc_num]}[1] ; ${$ref_doc}[1]
close(FILETMP_OUT);
open FILETMP_OUT, "$tmpfile" or die "No such file or directory\n";
lib/Alvis/NLPPlatform.pm view on Meta::CPAN
# PeerPort => $nlp_port,
# Proto => 'tcp');
# die "Could not create socket: $!\n" unless $sock;
$sock -> autoflush(1); ###############
binmode($sock, ":utf8");
print STDERR `date`;
print STDERR "Established connection to server.\n";
print STDERR "Requesting document...";
print $sock "REQUEST\n";
lib/Alvis/NLPPlatform.pm view on Meta::CPAN
} while(!defined($sock) && ($connection_retry >0));
if ($connection_retry ==0) {
die "Timeout. Could not create socket: $! \n";
}
binmode $sock, ":utf8";
print STDERR "Established connection to server.\n";
print STDERR "Giving back annotated document...\n";
# Communitation with the server
lib/Alvis/NLPPlatform.pm view on Meta::CPAN
if ($connection_retry ==0) {
die "Timeout. Could not create socket: $! \n";
}
$sock -> autoflush(1); ###############
binmode $sock, ":utf8";
print STDERR "Established connection to server.\n";
print STDERR "Sending aborting message\n";
lib/Alvis/NLPPlatform.pm view on Meta::CPAN
# await client connection
if ($client_sock=$sock->accept()) {
warn "Accepting a connection\n";
if (fork() == 0) {
close($sock);
binmode($client_sock, ":utf8");
my ($client_port,$client_iaddr) = sockaddr_in(getpeername($client_sock));
warn "Getting information about remote host\n";
$name=gethostbyaddr($client_iaddr,AF_INET);
&disp_log($name,"Client (".inet_ntoa($client_iaddr).":".$client_port.") has connected.");
$client_sock -> autoflush(1); ###############
lib/Alvis/NLPPlatform.pm view on Meta::CPAN
if (defined($id))
{
warn "Received\t$n\t$id\n";
`date`;
if (defined(open(I,">:utf8",$config{"ALVISTMP"} . "/${id}.xml")))
{
print I $xml;
close(I);
}
else
lib/Alvis/NLPPlatform.pm view on Meta::CPAN
$sub_dir=&sub_dir_from_id($id);
if ($config{"NLP_misc"}->{"SAVE_IN_OUTDIR"}) {
mkpath( $config{"alvis_connection"}->{"OUTDIR"} . "/$sub_dir");
}
my $xml = "";
if (($config{"NLP_misc"}->{"SAVE_IN_OUTDIR"} == 0) || (defined(open(O,">:utf8", $config{"alvis_connection"}->{"OUTDIR"} . "/$sub_dir/${id}.xml"))))
{
while((defined $sock) && ($line=<$client_sock>) && ($line ne "<DONE>\n")) {
# recording the annotation document (local)
# building xml string for sending to the next step
$xml .= $line;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/Pipeline/Read.pm view on Meta::CPAN
$lastread++;
my $filename = "$dir/$lastread";
my $f2 = new IO::File("<$filename")
or die "can't read file '$filename': $!";
binmode $f2, ":utf8";
my $doc = join("", <$f2>);
$f2->close();
unlink($filename);
$this->_write_and_unlock($dir, $fh, $lastread, $lastwrite);
lib/Alvis/Pipeline/Read.pm view on Meta::CPAN
while (1) {
$this->log(1, "accepting connection");
$this->{socket} = $listener->accept()
or die "can't accept connection: $!";
binmode $this->{socket}, ":utf8";
$this->log(1, "started background process, pid $$");
while (1) {
my $doc = $this->_read();
last if !defined $doc;
$this->_store_file($doc);
lib/Alvis/Pipeline/Read.pm view on Meta::CPAN
$lastwrite++;
my $filename = "$dir/$lastwrite";
my $f2 = new IO::File(">$filename")
or die "can't create new file '$filename': $!";
binmode $f2, ":utf8";
$f2->print($doc) or die "can't write '$filename': $!";
$f2->close() or die "can't close '$filename': $!";
$this->_write_and_unlock($dir, $fh, $lastread, $lastwrite);
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/run_QF.pl view on Meta::CPAN
my $f = shift();
my $canonise = shift();
my %dict = ();
my %line = ();
if (!defined(open(F,"<:utf8",$f)))
{
return undef;
}
while (my $l=<F>)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alvis/TermTagger.pm view on Meta::CPAN
use strict;
use warnings;
use utf8;
# TODO : write functions for term tagginga, term selection with and
# without offset in the corpus
sub termtagging {
lib/Alvis/TermTagger.pm view on Meta::CPAN
warn "Loading the terminological resource\n";
open DESC_TERMLIST, $termlist_name or die "$0: $termlist_name: No such file\n";
binmode(DESC_TERMLIST, ":utf8");
while($line1 = <DESC_TERMLIST>) {
chomp $line1;
utf8::decode($line1);
$line=$line1;
# Blank and comment lines are throw away
if (($line !~ /^\s*\#/o)&&($line !~ /^\s*\/\//o)&&($line !~ /^\s*$/o)) {
# Term is split from the other information
lib/Alvis/TermTagger.pm view on Meta::CPAN
warn "Loading the corpus\n";
open CORPUS, $corpus_filename or die "File $corpus_filename not found\n";
binmode(CORPUS, ":utf8");
while($line=<CORPUS>){
$lineLen = length($line);
chomp $line;
$ref_tabh_Corpus->{$sent_id}->{'line'} = $line;
lib/Alvis/TermTagger.pm view on Meta::CPAN
warn "Term tagging\n";
open TAGGEDCORPUS, ">>$offset_tagged_corpus_name" or die "$0: $offset_tagged_corpus_name: No such file\n";
binmode(TAGGEDCORPUS, ":utf8");
foreach $counter (keys %$ref_tabh_idtrm_select) {
$term_regex = $ref_regex_termlist->[$counter];
$termField2 = 0;
if (defined $ref_termlist->[$counter]->[$termField]) {
lib/Alvis/TermTagger.pm view on Meta::CPAN
warn "Term tagging ($offset_tagged_corpus_name)\n";
open TAGGEDCORPUS, ">$offset_tagged_corpus_name" or die "$0: $offset_tagged_corpus_name: No such file\n";
binmode(TAGGEDCORPUS, ":utf8");
if (!defined $termField) {
$termField = 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
rt.cpan.org.
ENHANCEMENTS:
- Allow any key starting with "pg_" when connecting a Postgres
database. This allows you to pass attributes like "pg_enable_utf8"
or "pg_bool_tf". Prompted by a discussion with Boris Shomodjvarac.
0.86 December 22, 2004
view all matches for this distribution
view release on metacpan or search on metacpan
package t::Util;
use strict;
use warnings;
use utf8;
use Exporter 'import';
our @EXPORT = qw/slurp/;
sub slurp {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/CloudFront/Thin.pm view on Meta::CPAN
return qq{<?xml version="1.0" encoding="UTF-8"?><InvalidationBatch xmlns="http://cloudfront.amazonaws.com/doc/2018-11-05/"><Paths><Quantity>$total_paths</Quantity><Items>$path_content</Items></Paths><CallerReference>$identifier</CallerReference><...
}
42;
__END__
=encoding utf8
=head1 NAME
Amazon::CloudFront::Thin - A thin, lightweight, low-level Amazon CloudFront client
lib/Amazon/CloudFront/Thin.pm view on Meta::CPAN
by URL Encoding the filenames. The following code takes a path such as
C<"events/Ø§ÙØ§Ø¨ØØ§Ø«"> which contains both a slash to indicate a directory
boundary and a non-ascii filename and creates an invalidation:
use Amazon::CloudFront::Thin;
use URL::Encode qw( url_encode_utf8 );
my $cloudfront = Amazon::CloudFront::Thin::->new( ... );
my $encoded_filename = url_encode_utf8($path);
# "/" will be encoded as %2F, but we want it as "/"
$encoded_filename =~ s!%2F!/!g;
$cloudfront->create_invalidation( '/' . $encoded_filename );
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
# UTF Support?
sub HAVE_UTF8 () { $] >= 5.007003 }
BEGIN {
if ( HAVE_UTF8 ) {
# The string eval helps hide this from Test::MinimumVersion
eval "require utf8;";
die "Failed to load UTF-8 support" if $@;
}
# Class structure
require 5.004;
t/000-report-versions.t view on Meta::CPAN
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
# Try to decode as utf8
utf8::decode($string) if HAVE_UTF8;
# Check for some special cases
return $self unless length $string;
unless ( $string =~ /[\012\015]+\z/ ) {
return $self->_error("Stream does not end with newline character");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/DynamoDB/Simple.pm view on Meta::CPAN
my %new;
for my $key (keys %item) {
my $value = $item{$key};
$new{$key} = $self->is_valid_json($value)
? JSON::XS->new->utf8->pretty->decode($value)
: $value;
}
return %new;
}
lib/Amazon/DynamoDB/Simple.pm view on Meta::CPAN
my %new;
for my $key (keys %item) {
my $value = $item{$key};
$new{$key} = ref $value
? JSON::XS->new->utf8->pretty->encode($value)
: $item{$key};
}
return %new;
}
sub is_valid_json {
my ($self, $json) = @_;
eval { JSON::XS->new->utf8->pretty->decode($json) };
return 0 if $@;
return 1;
}
sub permanent_delete {
view all matches for this distribution
view release on metacpan or search on metacpan
Author: Rusty Conover <rusty@luckydinosaur.com>
Date : 2014-06-22 14:47:31 +0000
Bump to version 0.14
Fix utf8 encode/decode for requests.
Change: 52be9b45c66952e5959617a5b30ad5a7e6ce4965
Author: Rusty Conover <rusty@luckydinosaur.com>
Date : 2014-05-23 18:15:13 +0000
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/MWS/Uploader.pm view on Meta::CPAN
package Amazon::MWS::Uploader;
use utf8;
use strict;
use warnings;
use DBI;
use Amazon::MWS::XML::Feed;
lib/Amazon/MWS/Uploader.pm view on Meta::CPAN
=item db_options
E.g.
{
mysql_enable_utf8 => 1,
}
AutoCommit and RaiseError are set by us.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/PAApi5/Payload.pm view on Meta::CPAN
/) {
my $method = decamelize($k);
$hash->{$k} = $self->$method;
}
return JSON::to_json($hash, { utf8 => 0, canonical => 1 });
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/S3/Thin/Credentials.pm view on Meta::CPAN
use Carp;
use JSON::PP ();
use LWP::UserAgent;
my $JSON = JSON::PP->new->utf8->canonical;
sub new {
my ($class, $key, $secret, $session_token) = @_;
my $self = {
key => $key,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/S3/Util.pm view on Meta::CPAN
use Digest::MD5 qw(md5 md5_hex);
use Digest::MD5::File qw(file_md5 file_md5_hex);
use English qw(-no_match_vars);
use MIME::Base64;
use Scalar::Util qw(reftype);
use URI::Escape qw(uri_escape_utf8);
use XML::Simple;
use parent qw(Exporter);
our @EXPORT_OK = qw(
lib/Amazon/S3/Util.pm view on Meta::CPAN
my (@args) = @_;
my $unencoded = ref $args[0] ? $args[1] : $args[0];
## no critic (RequireInterpolation)
return uri_escape_utf8( $unencoded, '^A-Za-z0-9\-\._~\x2f' );
}
# hashref or list of key/value pairs
########################################################################
sub create_query_string {
view all matches for this distribution
view release on metacpan or search on metacpan
- [Sergey Basmanov]
- Added SNS::Target and MobileAttributes
1.2 2013-08-24
- [Alessandro Zummo]
- add utf8 support
- use POST instead of GET, as a side-effect internal signing
has been implemented and thus Net::Amazon::AWSSign
is no more required.
- support different messages for different destinations, the $message
parameter must be an hashref
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Amazon/SNS.pm view on Meta::CPAN
# build URI
my $uri = URI->new($self->service);
$uri->path('/');
$uri->query(join('&', map { $_ . '=' . URI::Escape::uri_escape_utf8($args->{$_}, '^A-Za-z0-9\-_.~') } sort keys %$args ));
# create signature
$args->{'Signature'} = hmac_sha256_base64(join("\n", 'POST', $uri->host, $uri->path, $uri->query), $self->secret);
# padding
while (length($args->{'Signature'}) % 4) {
$args->{'Signature'} .= '=';
}
# rewrite query string
$uri->query(join('&', map { $_ . '=' . URI::Escape::uri_escape_utf8($args->{$_}, '^A-Za-z0-9\-_.~') } sort keys %$args ));
my $response = LWP::UserAgent->new->post($self->service, 'Content' => $uri->query);
$self->status_code($response->code);
view all matches for this distribution