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


AnyEvent-AggressiveIdle

 view release on metacpan or  search on metacpan

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

#!/usr/bin/perl

use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);

use Test::More tests    => 6;
use Encode qw(decode encode);


BEGIN {
    # Подготовка объекта тестирования для работы с utf8
    my $builder = Test::More->builder;
    binmode $builder->output,         ":utf8";
    binmode $builder->failure_output, ":utf8";
    binmode $builder->todo_output,    ":utf8";

#     use_ok 'AnyEvent::Impl::EV';
    use_ok 'AnyEvent';
    use_ok 'AnyEvent::AggressiveIdle';
}

 view all matches for this distribution


AnyEvent-Atom-Stream

 view release on metacpan or  search on metacpan

eg/stream-client.pl  view on Meta::CPAN


my $url = "http://updates.sixapart.com/atom-stream.xml";
my $cv  = AnyEvent->condvar;

# API is compatible to XML::Atom::Stream
binmode STDOUT, ":utf8";

my $client = AnyEvent::Atom::Stream->new(
    callback  => sub {
        my $feed = shift;
        for my $entry ($feed->entries) {

 view all matches for this distribution


AnyEvent-Beanstalk

 view release on metacpan or  search on metacpan

lib/AnyEvent/Beanstalk.pm  view on Meta::CPAN

  $pri   = int($pri   || 0) || 1;
  $ttr   = int($ttr   || 0) || 1;
  $delay = int($delay || 0) || 0;
  $data = '' unless defined $data;

  utf8::encode($data) if utf8::is_utf8($data);    # need bytes

  $self->run_cmd('put' => $pri, $delay, $ttr, length($data), $data, @cb);
}


 view all matches for this distribution


AnyEvent-Callback

 view release on metacpan or  search on metacpan

t/010-ae-cb.t  view on Meta::CPAN

#!/usr/bin/perl

use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);

use Test::More tests    => 36;
use Encode qw(decode encode);


BEGIN {
    # Подготовка объекта тестирования для работы с utf8
    my $builder = Test::More->builder;
    binmode $builder->output,         ":utf8";
    binmode $builder->failure_output, ":utf8";
    binmode $builder->todo_output,    ":utf8";

    use_ok 'AnyEvent::Callback';
}

#

 view all matches for this distribution


AnyEvent-CallbackStack

 view release on metacpan or  search on metacpan

lib/AE/CS.pm  view on Meta::CPAN


use AnyEvent::CallbackStack;

our $VERSION = $AnyEvent::CallbackStack::VERSION;

=encoding utf8

=head1 NAME

AE::CS - Shorter AnyEvent::CallbackStack API.

 view all matches for this distribution


AnyEvent-Connection

 view release on metacpan or  search on metacpan

lib/AnyEvent/Connection/Raw.pm  view on Meta::CPAN


sub push_write {
	my $self = shift;
	$self->{h} or return;
	for (@_) {
		if (!ref and utf8::is_utf8($_)) {
			$_ = $_;
			utf8::encode $_;
		}
	}
	$self->{h}->push_write(@_);
	warn ">> @_  " if $self->{debug};
}

lib/AnyEvent/Connection/Raw.pm  view on Meta::CPAN


sub say {
	my $self = shift;
	$self->{h} or return;
	for (@_) {
		if (!ref and utf8::is_utf8($_)) {
			$_ = $_;
			utf8::encode $_;
		}
	}
	$self->{h}->push_write("@_$self->{nl}");
	warn ">> @_  " if $self->{debug};
	return;

lib/AnyEvent/Connection/Raw.pm  view on Meta::CPAN

}

sub command {
	my $self = shift;
	my $write = shift;
	if (utf8::is_utf8($write)) {
		utf8::encode $write;
	}
	my %args = @_;
	$args{cb}  or croak "no cb for command at @{[ (caller)[1,2] ]}";
	$self->{h} or return $args{cb}(undef,"Not connected"),%args = ();
	weaken( $self->{waitingcb}{int $args{cb}} = $args{cb} );

 view all matches for this distribution


AnyEvent-CouchDB

 view release on metacpan or  search on metacpan

lib/AnyEvent/CouchDB.pm  view on Meta::CPAN

# exception class shortcuts
our $HTTPError = "AnyEvent::CouchDB::Exception::HTTPError";
our $JSONError = "AnyEvent::CouchDB::Exception::JSONError";

# default JSON encoder
our $default_json = JSON->new->allow_nonref->utf8;

# arbitrary uri support
sub _build_headers {
  my ( $self, $options ) = @_;
  my $headers = $options->{headers};

 view all matches for this distribution


AnyEvent-DBD-Pg

 view release on metacpan or  search on metacpan

ex/sample.pl  view on Meta::CPAN

	use EV;
	
	use AnyEvent::DBD::Pg;
	
	my $adb = AnyEvent::DBD::Pg->new('dbi:Pg:dbname=test', user => 'pass', {
		pg_enable_utf8 => 1,
		pg_server_prepare => 0,
		quote_char => '"',
		name_sep => ".",
	}, debug => 1);
	

 view all matches for this distribution



AnyEvent-DBI-MySQL

 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


AnyEvent-DNS-EtcHosts

 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


AnyEvent-Delay

 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


AnyEvent-Emitter

 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


AnyEvent-FCGI

 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


AnyEvent-FIFO

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN


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


AnyEvent-FastPing

 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


AnyEvent-ForkManager

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


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


AnyEvent-ForkObject

 view release on metacpan or  search on metacpan

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

#!/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


AnyEvent-FriendFeed-Realtime

 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


AnyEvent-GDB

 view release on metacpan or  search on metacpan

GDB.pm  view on Meta::CPAN

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



AnyEvent-Groonga

 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


AnyEvent-HTTP-ScopedClient

 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


AnyEvent-I3

 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


AnyEvent-IMAP

 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


AnyEvent-IRC-Server

 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


AnyEvent-ITM

 view release on metacpan or  search on metacpan

bin/itm_read_nocolor  view on Meta::CPAN


=head1 DESCRIPTION

Displays ITM/SWO Debugging data.

=encoding utf8

=head1 SUPPORT

Repository

 view all matches for this distribution



AnyEvent-InMemoryCache

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN


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



( run in 1.140 second using v1.01-cache-2.11-cpan-49f99fa48dc )