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


AnyEvent-FTP

 view release on metacpan or  search on metacpan

example/fput.pl  view on Meta::CPAN

{
  $ftp->cwd($remote->path)->recv;
}

open my $fh, '<', $local;
binmode $fh;

my $buffer;
my $count;

my $pb;

 view all matches for this distribution


AnyEvent-ForkObject

 view release on metacpan or  search on metacpan

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

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-Gearman

 view release on metacpan or  search on metacpan

inc/Module/Install/Can.pm  view on Meta::CPAN

	require File::Temp;
	my ( $FH, $tmpfile ) = File::Temp::tempfile(
		"compilexs-XXXXX",
		SUFFIX => '.c',
	);
	binmode $FH;
	print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

 view all matches for this distribution


AnyEvent-Gmail-Feed

 view release on metacpan or  search on metacpan

inc/Test/Builder.pm  view on Meta::CPAN

    
    $self->_try(sub {
        require PerlIO;
        my @src_layers = PerlIO::get_layers($src);

        binmode $dst, join " ", map ":$_", @src_layers if @src_layers;
    });
}

#line 1423

 view all matches for this distribution


AnyEvent-HTTP-LWP-UserAgent

 view release on metacpan or  search on metacpan

lib/AnyEvent/HTTP/LWP/UserAgent.pm  view on Meta::CPAN

    my $out_req;
    my $content = '';
    my $fh;
    if(!ref($arg) && defined($arg) && length($arg)) {
        open $fh, '>', $arg or $cv->croak("Can't write to '$arg': $!");
        binmode $fh;
        $args->{on_body} = sub {
            my ($d, $h) = @_;
            if($out_req->code < 200 || 300 <= $out_req->code) { # not success
                $content .= $d;
            } else {

 view all matches for this distribution


AnyEvent-HTTPD-ExtDirect

 view release on metacpan or  search on metacpan

lib/AnyEvent/HTTPD/ExtDirect.pm  view on Meta::CPAN

    
    my $content_length = do { use bytes; length $upload->[0] };
    
    my ($fh, $fname) = File::Temp::tempfile;
    
    binmode $fh;
    syswrite $fh, $upload->[0], $content_length;
    
    sysseek $fh, 0, 0;
    
    # We don't need the file content anymore, so try to release

 view all matches for this distribution


AnyEvent-I3X-Workspace-OnDemand

 view release on metacpan or  search on metacpan

t/00-compile.t  view on Meta::CPAN

    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
            $^X, @switches, '-e', "require q[$lib]"))
        if $ENV{PERL_COMPILE_TEST_DEBUG};

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$lib loaded ok");

    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/

t/00-compile.t  view on Meta::CPAN

    diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
            $^X, @switches, '-c', $file))
        if $ENV{PERL_COMPILE_TEST_DEBUG};

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$file compiled ok");

    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/

 view all matches for this distribution


AnyEvent-Impl-Prima

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

    my( $filename, $new_content ) = @_;
    my $content;
    if( -f $filename ) {
        open my $fh, '<', $filename
            or die "Couldn't read '$filename': $!";
        binmode $fh;
        local $/;
        $content = <$fh>;
    };

    if( $content ne $new_content ) {
        if( open my $fh, '>', $filename ) {
            binmode $fh;
            print $fh $new_content;
        } else {
            warn "Couldn't (re)write '$filename': $!";
        };
    };

 view all matches for this distribution


AnyEvent-JSONRPC-Lite

 view release on metacpan or  search on metacpan

inc/Test/Builder.pm  view on Meta::CPAN


sub _apply_layers {
    my ($fh, @layers) = @_;
    my %seen;
    my @unique = grep { $_ ne 'unix' and !$seen{$_}++ } @layers;
    binmode($fh, join(":", "", "raw", @unique));
}


#line 1926

 view all matches for this distribution


AnyEvent-JSONRPC

 view release on metacpan or  search on metacpan

inc/Test/Builder.pm  view on Meta::CPAN

    $self->_try(
        sub {
            require PerlIO;
            my @src_layers = PerlIO::get_layers($src);

            binmode $dst, join " ", map ":$_", @src_layers if @src_layers;
        }
    );

    return;
}

 view all matches for this distribution


AnyEvent-Lingr

 view release on metacpan or  search on metacpan

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


use strict;
use warnings;
use utf8;

binmode STDOUT, ':utf8';

use AnyEvent;
use AnyEvent::Lingr;

use Config::Pit;

 view all matches for this distribution


AnyEvent-MPRPC

 view release on metacpan or  search on metacpan

inc/Module/Install/Can.pm  view on Meta::CPAN

	require File::Temp;
	my ( $FH, $tmpfile ) = File::Temp::tempfile(
		"compilexs-XXXXX",
		SUFFIX => '.c',
	);
	binmode $FH;
	print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

 view all matches for this distribution


AnyEvent-Mac-Pasteboard

 view release on metacpan or  search on metacpan

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


AnyEvent-Memcached

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

}

sub _read {
	local *FH;
	open( FH, '<', $_[0] ) or die "open($_[0]): $!";
	binmode FH;
	my $string = do { local $/; <FH> };
	close FH or die "close($_[0]): $!";
	return $string;
}

inc/Module/Install.pm  view on Meta::CPAN

}

sub _write {
	local *FH;
	open( FH, '>', $_[0] ) or die "open($_[0]): $!";
	binmode FH;
	foreach ( 1 .. $#_ ) {
		print FH $_[$_] or die "print($_[0]): $!";
	}
	close FH or die "close($_[0]): $!";
}

 view all matches for this distribution


AnyEvent-Net-Amazon-S3

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.44 Thu Mar 27 08:35:59 GMT 2008
    - fix bug with storing files consisting of "0" (thanks to
      Martin Atkins)

0.43 Sat Mar  1 10:55:54 GMT 2008
     - add binmode() to support Windows (thanks to Gabriel Weinberg)

0.42 Thu Feb 28 06:39:59 GMT 2008
     - add exponential backoff upon temporary errors with the new
       retry option

 view all matches for this distribution


AnyEvent-Net-Curl-Queued

 view release on metacpan or  search on metacpan

bin/yada  view on Meta::CPAN

        sub {
            my ($self) = @_;

            # will die() later
            sysopen($fh, $name, O_CREAT | O_NONBLOCK | O_WRONLY);
            binmode $fh;

            $self->setopt(
                encoding            => $encoding // q(),
                maxredirs           => $maxredirs // 5,
                noprogress          => $quiet,

 view all matches for this distribution


AnyEvent-Onkyo

 view release on metacpan or  search on metacpan

t/03-discover.t  view on Meta::CPAN

use AnyEvent::Onkyo;
use IO::Socket::INET;

socket my $s, PF_INET, SOCK_DGRAM, getprotobyname('udp');
setsockopt $s, SOL_SOCKET, SO_BROADCAST, 1;
binmode $s;
bind $s, sockaddr_in(0, inet_aton('127.0.0.1'))
  or plan skip_all => "Failed to bind to loopback address: $!";
my ($port, $addr) = sockaddr_in(getsockname($s));
my $tcp =
  IO::Socket::INET->new(Listen => 5, Proto => 'tcp',

 view all matches for this distribution


AnyEvent-Pcap

 view release on metacpan or  search on metacpan

inc/Test/Builder.pm  view on Meta::CPAN


sub _apply_layers {
    my ($fh, @layers) = @_;
    my %seen;
    my @unique = grep { $_ ne 'unix' and !$seen{$_}++ } @layers;
    binmode($fh, join(":", "", "raw", @unique));
}


#line 1926

 view all matches for this distribution


AnyEvent-Ping

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

# Done in evals to avoid confusing Perl::MinimumVersion
eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _read {
	local *FH;
	open( FH, '<', $_[0] ) or die "open($_[0]): $!";
	binmode FH;
	my $string = do { local $/; <FH> };
	close FH or die "close($_[0]): $!";
	return $string;
}
END_NEW
sub _read {
	local *FH;
	open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
	binmode FH;
	my $string = do { local $/; <FH> };
	close FH or die "close($_[0]): $!";
	return $string;
}
END_OLD

inc/Module/Install.pm  view on Meta::CPAN

# Done in evals to avoid confusing Perl::MinimumVersion
eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _write {
	local *FH;
	open( FH, '>', $_[0] ) or die "open($_[0]): $!";
	binmode FH;
	foreach ( 1 .. $#_ ) {
		print FH $_[$_] or die "print($_[0]): $!";
	}
	close FH or die "close($_[0]): $!";
}
END_NEW
sub _write {
	local *FH;
	open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
	binmode FH;
	foreach ( 1 .. $#_ ) {
		print FH $_[$_] or die "print($_[0]): $!";
	}
	close FH or die "close($_[0]): $!";
}

 view all matches for this distribution


AnyEvent-RabbitMQ-RPC

 view release on metacpan or  search on metacpan

inc/Module/Install/Can.pm  view on Meta::CPAN

	require File::Temp;
	my ( $FH, $tmpfile ) = File::Temp::tempfile(
		"compilexs-XXXXX",
		SUFFIX => '.c',
	);
	binmode $FH;
	print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

 view all matches for this distribution


AnyEvent-RabbitMQ-Simple

 view release on metacpan or  search on metacpan

t/00-compile.t  view on Meta::CPAN

{
    # see L<perlfaq8/How can I capture STDERR from an external command?>
    my $stderr = IO::Handle->new;

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$lib loaded ok");

    if (@_warnings)

 view all matches for this distribution


AnyEvent-Redis

 view release on metacpan or  search on metacpan

inc/Module/Install/Can.pm  view on Meta::CPAN

	require File::Temp;
	my ( $FH, $tmpfile ) = File::Temp::tempfile(
		"compilexs-XXXXX",
		SUFFIX => '.c',
	);
	binmode $FH;
	print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

 view all matches for this distribution


AnyEvent-ReverseHTTP

 view release on metacpan or  search on metacpan

inc/Test/Builder.pm  view on Meta::CPAN

    $self->_try(
        sub {
            require PerlIO;
            my @src_layers = PerlIO::get_layers($src);

            binmode $dst, join " ", map ":$_", @src_layers if @src_layers;
        }
    );

    return;
}

 view all matches for this distribution


AnyEvent-Riak

 view release on metacpan or  search on metacpan

t/00-compile.t  view on Meta::CPAN

    # see L<perlfaq8/How can I capture STDERR from an external command?>
    open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
    my $stderr = IO::Handle->new;

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$lib loaded ok");

    if (@_warnings)

 view all matches for this distribution


AnyEvent-SMTP

 view release on metacpan or  search on metacpan

inc/Module/Install/Can.pm  view on Meta::CPAN

	require File::Temp;
	my ( $FH, $tmpfile ) = File::Temp::tempfile(
		"compilexs-XXXXX",
		SUFFIX => '.c',
	);
	binmode $FH;
	print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

 view all matches for this distribution


AnyEvent-Superfeedr

 view release on metacpan or  search on metacpan

eg/print_feed_titles.pl  view on Meta::CPAN

use AnyEvent::Superfeedr;
use Encode;

die "$0 <jid> <pass>" unless @ARGV >= 2;

binmode STDOUT, ":utf8";

my $end = AnyEvent->condvar;
my $sf = AnyEvent::Superfeedr->new(
    debug => $ENV{DEBUG},
    jid => shift,

 view all matches for this distribution


AnyEvent-Tickit

 view release on metacpan or  search on metacpan

t/00-compile.t  view on Meta::CPAN

{
    # see L<perlfaq8/How can I capture STDERR from an external command?>
    my $stderr = IO::Handle->new;

    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$lib loaded ok");

    if (@_warnings)

 view all matches for this distribution


AnyEvent-Tools

 view release on metacpan or  search on metacpan

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



BEGIN {
    # Подготовка объекта тестирования для работы с utf8
    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::Tools', ':mutex';
}

 view all matches for this distribution


AnyEvent-Twitter

 view release on metacpan or  search on metacpan

inc/Module/Install/Can.pm  view on Meta::CPAN

	require File::Temp;
	my ( $FH, $tmpfile ) = File::Temp::tempfile(
		"compilexs-XXXXX",
		SUFFIX => '.c',
	);
	binmode $FH;
	print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

 view all matches for this distribution


( run in 0.494 second using v1.01-cache-2.11-cpan-87723dcf8b7 )