view release on metacpan or search on metacpan
lib/AnyEvent/Task/Server/Worker.pm view on Meta::CPAN
my ($server, $fh, $monitor_fh) = @_;
AnyEvent::Util::fh_nonblocking $fh, 0;
AnyEvent::Util::fh_nonblocking $monitor_fh, 0;
$json = JSON::XS->new->utf8;
$sel = IO::Select->new;
$sel->add($fh, $monitor_fh);
while(1) {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/demo.pl view on Meta::CPAN
my ( $key ) = @_;
print "Got key: ".$key->termkey->format_key( $key, FORMAT_VIM )."\n";
$cv->send if $key->type_is_unicode and
$key->utf8 eq "C" and
$key->modifiers & KEYMOD_CTRL;
},
);
$cv->recv;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Tools/Buffer.pm view on Meta::CPAN
use utf8;
use strict;
use warnings;
package AnyEvent::Tools::Buffer;
use AnyEvent::AggressiveIdle qw(aggressive_idle stop_aggressive_idle);
view all matches for this distribution
view release on metacpan or search on metacpan
eg/track.pl view on Meta::CPAN
my $done = AE::cv;
my($user, $password, $method, %args) = @ARGV;
binmode STDOUT, ":utf8";
my $streamer = AnyEvent::Twitter::Stream->new(
username => $user,
password => $password,
method => $method || "sample",
view all matches for this distribution
view release on metacpan or search on metacpan
eg/gen_token.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use JSON;
use AnyEvent;
use AnyEvent::Twitter;
my %p;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/UWSGI.pm view on Meta::CPAN
$env->{REMOTE_PORT} = $lport;
$env->{SERVER_PORT} = $rport;
$env->{SERVER_NAME} = $rhost;
if ($hdr{'x-uwsgi-nginx-compatible-mode'}) {
$env->{PATH_INFO} = Encode::decode('utf8', URI::Escape::XS::uri_unescape($env->{PATH_INFO}));
}
foreach my $k (keys %hdr) {
(my $env_k = uc $k) =~ tr/-/_/;
$env->{"HTTP_$env_k"} = defined $hdr{$k} ? $hdr{$k} : '';
}
my $data = '';
foreach my $k (sort keys %$env) {
die "Undef value found for $k" unless defined $env->{$k};
$data .= pack 'v/a*v/a*', map { Encode::encode('utf8', $_) } $k, $env->{$k};
}
my $req_buf = pack('C1v1C1',
defined $arg{modifier1} ? $arg{modifier1} : 5, # default PSGI_MODIFIER1,
length($data),
view all matches for this distribution
view release on metacpan or search on metacpan
WebDriver.pm view on Meta::CPAN
our $WEB_ELEMENT_IDENTIFIER = "element-6066-11e4-a52e-4f735466cecf";
our $WEB_WINDOW_IDENTIFIER = "window-fcc6-11e5-b4f8-330a88ab9d7f";
our $WEB_FRAME_IDENTIFIER = "frame-075b-4da1-b6ba-e579c2d3230a";
my $json = eval { require JSON::XS; JSON::XS:: } || do { require JSON::PP; JSON::PP:: };
$json = $json->new->utf8;
$json->boolean_values (0, 1)
if $json->can ("boolean_values");
sub _decode_base64 {
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
[RemovePrereqs]
; comes with perl 5.8
remove = strict
remove = warnings
remove = utf8
remove = lib
remove = base
remove = Scalar::Util
remove = Carp
remove = Encode
view all matches for this distribution
view release on metacpan or search on metacpan
use lib ($FindBin::RealBin);
use testlib::Util qw(start_server set_timeout memory_cycle_ok memory_cycle_exists);
use testlib::ConnConfig;
use AnyEvent::WebSocket::Server;
use AnyEvent::WebSocket::Client;
no utf8;
set_timeout;
testlib::ConnConfig->for_all_ok_conn_configs(sub {
my ($cconfig) = @_;
view all matches for this distribution