view release on metacpan or search on metacpan
lib/AnyEvent/DBI/MySQL.pm view on Meta::CPAN
package AnyEvent::DBI::MySQL;
use 5.010001;
use warnings;
use strict;
use utf8;
use Carp;
our $VERSION = 'v2.1.0';
## no critic(ProhibitMultiplePackages Capitalization ProhibitNoWarnings)
lib/AnyEvent/DBI/MySQL.pm view on Meta::CPAN
1; # Magic true value required at end of module
__END__
=encoding utf8
=head1 NAME
AnyEvent::DBI::MySQL - Asynchronous MySQL queries
view all matches for this distribution
view release on metacpan or search on metacpan
xt/copyright.t view on Meta::CPAN
# Note: man pages will fail to match if the correct form of the
# copyright symbol is used because the man page translators don't
# handle UTF-8.
#
# For some reason, Vim writes a bad utf8 version of the copyright sign
# if I attempt to modify the line. So, disable the violation. *sigh*
## no critic (ProhibitEscapedMetacharacters)
my @copyright_years = $content =~ m<
(?: copyright(?:\s\(c\))? | \(c\) )
\s*
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Delay.pm view on Meta::CPAN
}
}
1;
=encoding utf8
=head1 NAME
AnyEvent::Delay - Manage AnyEvent callbacks and control the flow of events
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Emitter.pm view on Meta::CPAN
}
1;
=encoding utf8
=head1 NAME
AnyEvent::Emitter - Event emitter base class (Mojo::EventEmitter porting).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/FCGI/Request.pm view on Meta::CPAN
local %ENV = %{$request->params};
local $CGI::Q = new CGI::Stateless;
$request->respond(
'Hello, ' . (CGI::param('name') || 'anonymous'),
'Content-Type' => 'text/html; charset=utf8',
'Set-Cookie' => 'cookie_a=1; path=/',
'Set-Cookie' => 'cookie_b=2; path=/',
);
}
);
view all matches for this distribution
view release on metacpan or search on metacpan
use 5.008_001;
use strict;
use warnings;
use utf8;
use Module::Build;
use File::Basename;
use File::Spec;
use CPAN::Meta;
view all matches for this distribution
view release on metacpan or search on metacpan
FastPing.xs view on Meta::CPAN
{
SV *pv = NEWSV (0, sizeof (PINGER));
PINGER *self = (PINGER *)SvPVX (pv);
SvPOK_only (pv);
XPUSHs (sv_2mortal (sv_bless (newRV_noinc (pv), gv_stashpv (SvPVutf8_nolen (klass), 1))));
pinger_init (self);
self->magic1 = magic1;
self->magic2 = magic2;
self->magic3 = magic3;
}
FastPing.xs view on Meta::CPAN
cnt = av_len (av) + 1;
for (i = 0; i < cnt; ++i)
{
SV *sv = *av_fetch (av, i, 1);
sv_utf8_downgrade (sv, 0);
j = SvCUR (sv);
if (j != 4 && j != 16)
croak ("AnyEvent::FastPing::add_hosts addresses must be specified as binary IPv4 or IPv6 addresses");
FastPing.xs view on Meta::CPAN
{
uint8_t *dst = (uint8_t *)(range + 1) + --k * addrlen;
char *pv;
STRLEN pvlen;
SV *sv = *av_fetch (av, i, 1);
sv_utf8_downgrade (sv, 0);
pv = SvPVbyte (sv, pvlen);
if (pvlen != addrlen)
{
view all matches for this distribution
view release on metacpan or search on metacpan
0.05 2015-05-06T02:19:37Z
- (no feature changes.)
- use Time::HiRes::sleep for sleep in author test. (choroba)
- no load `utf8.pm`. (choroba)
- fix some English spelling. (choroba)
- required Test::SharedFork 0.31 or newer.
0.04 2013-04-14T08:25:03Z
view all matches for this distribution
view release on metacpan or search on metacpan
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More tests => 39;
use Encode qw(decode encode);
BEGIN {
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent';
use_ok 'AnyEvent::ForkObject';
}
view all matches for this distribution
view release on metacpan or search on metacpan
eg/track.pl view on Meta::CPAN
use AnyEvent::FriendFeed::Realtime;
my($user, $remote_key, $request) = @ARGV;
my $done = AnyEvent->condvar;
binmode STDOUT, ":utf8";
my $client = AnyEvent::FriendFeed::Realtime->new(
username => $user,
remote_key => $remote_key,
request => $request || "/feed/home",
view all matches for this distribution
view release on metacpan or search on metacpan
sub _q($) {
return $_[0]
if $_[0] =~ /^[A-Za-z0-9_]+$/; # we are a lot more strict than the spec
local $_ = shift;
utf8::encode $_; # just in case
s/([^\x20-\x21\x23-\x5b\x5d-\x7e])/sprintf "\\x%02x", ord $1/ge;
"\"$_\""
}
=item $gdb->cmd_raw ($command, $cb->($class, $results, $console))
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/TestBase.pm view on Meta::CPAN
$self->requires('Filter::Util::Call');
}
1;
=encoding utf8
#line 70
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Groonga.pm view on Meta::CPAN
$url,
sub {
my $json = shift;
my $result;
try {
my $data = JSON->new->utf8->decode($json);
$result = AnyEvent::Groonga::Result->new(
posted_command => $command,
data => $data
);
}
lib/AnyEvent/Groonga.pm view on Meta::CPAN
$cmd_cv->cb(
sub {
my $json = $stdout;
my $result;
try {
my $data = JSON->new->utf8->decode($json);
$result = AnyEvent::Groonga::Result->new(
posted_command => $command,
data => $data
);
}
lib/AnyEvent/Groonga.pm view on Meta::CPAN
}
sub _select_filter {
my $self = shift;
my $data = shift;
$data = decode( "utf8", $data ) unless utf8::is_utf8($data);
$data =~ /(^|[^\\])"|'/;
if ($1) {
$data =~ s/(^|[^\\])"|'/$1\\"/g;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/HTTP/ScopedClient.pm view on Meta::CPAN
use URI;
use Try::Tiny;
use MIME::Base64;
use HTTP::Request;
use Encode qw/encode_utf8/;
use AnyEvent::HTTP;
use URI::QueryParam;
use URI::Escape;
has 'options' => (
lib/AnyEvent/HTTP/ScopedClient.pm view on Meta::CPAN
if ( 'HASH' eq ref($reqBody) ) {
my @pair;
# push @pair, "$_=$reqBody->{$_}" for ( keys %$reqBody );
push @pair, "$_=" . uri_escape_utf8( $reqBody->{$_} )
for ( keys %$reqBody );
$reqBody = join( '&', @pair );
}
my $sendingData
lib/AnyEvent/HTTP/ScopedClient.pm view on Meta::CPAN
http_request(
$method,
$options{url},
headers => \%headers,
body => $sendingData ? encode_utf8($reqBody) : undef,
$callback
);
}
catch {
$callback->($_) if $callback;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/I3.pm view on Meta::CPAN
}
=head2 $i3->message($type, $content)
Sends a message of the specified C<type> to i3, possibly containing the data
structure C<content> (or C<content>, encoded as utf8, if C<content> is a
scalar), if specified.
my $reply = $i3->message(TYPE_RUN_COMMAND, "reload")->recv;
if ($reply->{success}) {
say "Configuration successfully reloaded";
lib/AnyEvent/I3.pm view on Meta::CPAN
my $payload = "";
if ($content) {
if (not ref($content)) {
# Convert from Perlâs internal encoding to UTF8 octets
$payload = encode_utf8($content);
} else {
$payload = encode_json $content;
}
}
my $message = $magic . pack("LL", length($payload), $type) . $payload;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/I3X/Workspace/OnDemand.pm view on Meta::CPAN
return $groups[0];
}
method _set_property_on_root_window($key, $value) {
my $prop = $self->x11->atom($key);
my $utf8 = $self->x11->atom('UTF8_STRING');
$x11->ChangeProperty($xroot, $prop, $utf8, 8, 'Replace', $value);
$self->restart_i3_status;
$x11->flush;
}
method set_group_on_root_window($name) {
view all matches for this distribution
view release on metacpan or search on metacpan
example/demo.pl view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use 5.010000;
use autodie;
use AnyEvent::IMAP;
use Config::Pit;
use Log::Minimal;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/proxy.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use Encode;
use AE;
use AnyEvent::IRC::Server;
use AnyEvent::IRC::Client;
examples/proxy.pl view on Meta::CPAN
my $nick = $msg->{prefix};
$nick =~ s/\!.*$//;
$ircd->daemon_cmd_privmsg(
$nick => $channel,
encode('utf8', Lingua::JA::Gal->gal(decode('utf8',$message))),
);
}
);
$ic->send_srv( 'JOIN', '#yokohama.pm' );
$ic->connect(
view all matches for this distribution
view release on metacpan or search on metacpan
t/08_idna.t view on Meta::CPAN
use utf8;
use AnyEvent::Util;
use Test::More;
plan skip_all => 'TODO';
view all matches for this distribution
view release on metacpan or search on metacpan
use 5.008_001;
use strict;
use warnings;
use utf8;
use Module::Build;
use File::Basename;
use File::Spec;
use CPAN::Meta;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/TestBase.pm view on Meta::CPAN
$self->requires('Filter::Util::Call');
}
1;
=encoding utf8
#line 70
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/TestBase.pm view on Meta::CPAN
$self->requires('Filter::Util::Call');
}
1;
=encoding utf8
#line 70
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Kanye.pm view on Meta::CPAN
package AnyEvent::Kanye;
use strict;
use warnings;
use utf8;
use AnyEvent ();
use Lingua::EN::Inflect qw(PL);
BEGIN { our @ISA = "AnyEvent::CondVar" }
view all matches for this distribution
view release on metacpan or search on metacpan
use 5.008_001;
use strict;
use warnings;
use utf8;
use Module::Build;
use File::Basename;
use File::Spec;
use CPAN::Meta;
view all matches for this distribution
view release on metacpan or search on metacpan
eg/lingr-stream.pl view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
binmode STDOUT, ':utf8';
use AnyEvent;
use AnyEvent::Lingr;
use Config::Pit;
view all matches for this distribution
view release on metacpan or search on metacpan
MP/Config.pm view on Meta::CPAN
sub load {
if (open my $fh, "<:raw", $CONFIG_FILE) {
return if eval {
local $/;
%CFG = %{ JSON::XS->new->utf8->relaxed->decode (scalar <$fh>) };
1
};
}
%CFG = (
MP/Config.pm view on Meta::CPAN
return unless delete $CFG{dirty};
open my $fh, ">:raw", "$CONFIG_FILE~new~"
or Carp::croak "$CONFIG_FILE~new~: $!";
syswrite $fh, JSON::XS->new->pretty->utf8->encode (\%CFG) . "\n"
or Carp::croak "$CONFIG_FILE~new~: $!";
close $fh
or Carp::croak "$CONFIG_FILE~new~: $!";
view all matches for this distribution
view release on metacpan or search on metacpan
sub OBSID() { 2**52 }
our $JSON = eval { require JSON::XS; JSON::XS:: }
|| do { require JSON::PP; JSON::PP:: };
our $JSON_ENCODER = $JSON->new->utf8;
our $JSON_DECODER = $JSON->new->latin1;
our $mpv_path; # last mpv path used
our $mpv_optionlist; # output of mpv --list-options
view all matches for this distribution
view release on metacpan or search on metacpan
t/02_changing.t view on Meta::CPAN
use strict;
use warnings;
use lib qw(lib);
use utf8;
use constant TEST_COUNT => 4;
use Test::More tests => TEST_COUNT;
t/02_changing.t view on Meta::CPAN
use AnyEvent::Mac::Pasteboard ();
use Encode;
use File::Temp;
use Time::HiRes;
binmode STDOUT, ':utf8';
binmode STDERR, ':utf8';
my $cv = AE::cv;
my @dictionary = (qw(FINE â â CLOUD RAIN â â â â
⬠⪠â«));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Memcached.pm view on Meta::CPAN
}
}
sub _do {
my $self = shift;
my $key = shift; utf8::decode($key) xor utf8::encode($key) if utf8::is_utf8($key);
my $command = shift; utf8::decode($command) xor utf8::encode($command) if utf8::is_utf8($command);
my $worker = shift; # CODE
my %args = @_;
my $servers = $self->{hash}->servers($key);
my %res;
my %err;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/MessagePack.pm view on Meta::CPAN
});
1;
__END__
=encoding utf8
=head1 NAME
AnyEvent::MessagePack - MessagePack stream serializer/deserializer for AnyEvent
view all matches for this distribution