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


AnyEvent-Cron

 view release on metacpan or  search on metacpan

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

            my $cur = _load($mod);
            if (_version_cmp ($cur, $arg) >= 0)
            {
                print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
                push @Existing, $mod => $arg;
                $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
            }
            else {
                if (not defined $cur)   # indeed missing
                {
                    print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";

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

                ) =~ /^[Yy]/
            )
          )
        {
            push( @Missing, @required );
            $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
        }

        elsif ( !$SkipInstall
            and $default
            and $mandatory
            and
            _prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
            =~ /^[Nn]/ )
        {
            push( @Missing, @required );
            $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
        }

        else {
            $DisabledTests{$_} = 1 for map { glob($_) } @tests;
        }
    }

    if ( @Missing and not( $CheckOnly or $UnderCPAN) ) {
        require Config;

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

    }

    $args{test}{TESTS} ||= 't/*.t';
    $args{test}{TESTS} = join( ' ',
        grep { !exists( $DisabledTests{$_} ) }
          map { glob($_) } split( /\s+/, $args{test}{TESTS} ) );

    my $missing = join( ',', @Missing );
    my $config =
      join( ',', UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
      if $Config;

 view all matches for this distribution


AnyEvent-Curl-Multi

 view release on metacpan or  search on metacpan

lib/AnyEvent/Curl/Multi.pm  view on Meta::CPAN


 $client->max_concurrency(10);

A value of 0 means no limit will be imposed.

You can also set global default behaviors for requests: 

=over

=item timeout => PERIOD

 view all matches for this distribution


AnyEvent-DAAP-Server

 view release on metacpan or  search on metacpan

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

		@exts = $self->{admin}->load_all_extensions;
	}

	my %seen;
	foreach my $obj ( @exts ) {
		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
			next unless $obj->can($method);
			next if $method =~ /^_/;
			next if $method eq uc($method);
			$seen{$method}++;
		}

 view all matches for this distribution


AnyEvent-DBD-Pg

 view release on metacpan or  search on metacpan

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

            my $cur = _load($mod);
            if (_version_cmp ($cur, $arg) >= 0)
            {
                print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
                push @Existing, $mod => $arg;
                $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
            }
            else {
                if (not defined $cur)   # indeed missing
                {
                    print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";

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

                ) =~ /^[Yy]/
            )
          )
        {
            push( @Missing, @required );
            $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
        }

        elsif ( !$SkipInstall
            and $default
            and $mandatory
            and
            _prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
            =~ /^[Nn]/ )
        {
            push( @Missing, @required );
            $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
        }

        else {
            $DisabledTests{$_} = 1 for map { glob($_) } @tests;
        }
    }

    if ( @Missing and not( $CheckOnly or $UnderCPAN ) ) {
        require Config;

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

    }

    $args{test}{TESTS} ||= 't/*.t';
    $args{test}{TESTS} = join( ' ',
        grep { !exists( $DisabledTests{$_} ) }
          map { glob($_) } split( /\s+/, $args{test}{TESTS} ) );

    my $missing = join( ',', @Missing );
    my $config =
      join( ',', UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
      if $Config;

 view all matches for this distribution


AnyEvent-DBI-Abstract-Limit

 view release on metacpan or  search on metacpan

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

		@exts = $self->{admin}->load_all_extensions;
	}

	my %seen;
	foreach my $obj ( @exts ) {
		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
			next unless $obj->can($method);
			next if $method =~ /^_/;
			next if $method eq uc($method);
			$seen{$method}++;
		}

 view all matches for this distribution


AnyEvent-DBI-Abstract

 view release on metacpan or  search on metacpan

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

		@exts = $self->{admin}->load_all_extensions;
	}

	my %seen;
	foreach my $obj ( @exts ) {
		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
			next unless $obj->can($method);
			next if $method =~ /^_/;
			next if $method eq uc($method);
			$seen{$method}++;
		}

 view all matches for this distribution


AnyEvent-DBI

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - do not leave zombie processes (Adam Rosenstein).

2.1  Sat Oct 30 22:22:05 CEST 2010
	- no longer kill -9 the child, just kill -TERM and close the connection,
          to avoid database corruption - this also works around a perl bug
          (global destruction).
	- convert to the faster AE API - major speedup.
        - use common::sense.

2.0  Mon Jun 29 10:18:58 CEST 2009
	- INCOMPATIBLE CHANGE: callbacks now are passed the $dbh

 view all matches for this distribution


AnyEvent-DNS-EtcHosts

 view release on metacpan or  search on metacpan

lib/AnyEvent/DNS/EtcHosts.pm  view on Meta::CPAN


$ perl -MAnyEvent::DNS::EtcHosts script.pl

=for markdown ```

Enables this module globally. Additional arguments will be passed to
L<AnyEvent::DNS> constructor.

=cut

sub import {

lib/AnyEvent/DNS/EtcHosts.pm  view on Meta::CPAN

    $GUARD = $class->register(%args);
}

=head2 no AnyEvent::DNS::EtcHosts

Disables this module globally.

=cut

sub unimport {
    my ($class) = @_;

lib/AnyEvent/DNS/EtcHosts.pm  view on Meta::CPAN

Enables this module in lexical scope. The module will be disabled out of
scope. Additional arguments will be passed to L<AnyEvent::DNS> constructor.

If you want to use AnyEvent::DNS::EtcHosts in lexical scope only, you should
use C<require> rather than C<use> keyword, because C<import> method enables
AnyEvent::DNS::EtcHosts globally.

=cut

sub register {
    my ($class, %args) = @_;

 view all matches for this distribution


AnyEvent-Debounce

 view release on metacpan or  search on metacpan

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

		@exts = $self->{admin}->load_all_extensions;
	}

	my %seen;
	foreach my $obj ( @exts ) {
		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
			next unless $obj->can($method);
			next if $method =~ /^_/;
			next if $method eq uc($method);
			$seen{$method}++;
		}

 view all matches for this distribution


AnyEvent-Eris

 view release on metacpan or  search on metacpan

lib/AnyEvent/eris/Server.pm  view on Meta::CPAN

    my $client_streams = delete $self->clients->{$SID}{'streams'}{$stream};

    # FIXME:
    # I *think* what this is supposed to do is delete assists
    # that were registered for this client, which it doesn't
    # - it deletes global assists instead - this needs to be
    # looked into
    if ($client_streams) {
        if ( my $assist = $_STREAM_ASSISTERS{$stream} ) {
            foreach my $key ( keys %{$client_streams} ) {
                --$self->{'assists'}{$assist}{$key} <= 0

 view all matches for this distribution


AnyEvent-FCP

 view release on metacpan or  search on metacpan

FCP.pm  view on Meta::CPAN


   use AnyEvent::FCP;

   my $fcp = new AnyEvent::FCP;

   $fcp->watch_global (1, 0);
   my $req = $fcp->list_persistent_requests;

TODO
   for my $req (values %$req) {
      if ($req->{filename} =~ /a/) {

FCP.pm  view on Meta::CPAN

         1
      },
   );
};

=item $fcp->watch_global ($enabled[, $verbosity_mask])

=cut

_txn watch_global => sub {
   my ($self, $ok, $err, $enabled, $verbosity_mask) = @_;

   $self->send_msg (watch_global =>
      enabled        => $enabled ? "true" : "false",
      defined $verbosity_mask ? (verbosity_mask => $verbosity_mask+0) : (),
   );

   $ok->();

FCP.pm  view on Meta::CPAN

         1
      });
   });
};

=item $sync = $fcp->modify_persistent_request ($global, $identifier[, $client_token[, $priority_class]])

Update either the C<client_token> or C<priority_class> of a request
identified by C<$global> and C<$identifier>, depending on which of
C<$client_token> and C<$priority_class> are not C<undef>.

=cut

_txn modify_persistent_request => sub {
   my ($self, $ok, $err, $global, $identifier, $client_token, $priority_class) = @_;

   $self->serialise ($identifier => sub {
      my ($self, $guard) = @_;

      $self->send_msg (modify_persistent_request =>
         global     => $global ? "true" : "false",
         identifier => $identifier,
         defined $client_token   ? (client_token   => $client_token  ) : (),
         defined $priority_class ? (priority_class => $priority_class) : (),
      );

FCP.pm  view on Meta::CPAN

=item $status = $fcp->client_get ($uri, $identifier, %kv)

%kv can contain (L<http://wiki.freenetproject.org/FCP2p0ClientGet>).

ignore_ds, ds_only, verbosity, max_size, max_temp_size, max_retries,
priority_class, persistence, client_token, global, return_type,
binary_blob, allowed_mime_types, filename, temp_filename

=cut

_txn client_get => sub {

FCP.pm  view on Meta::CPAN

         1
      });
   });
};

=item $status = $fcp->remove_request ($identifier[, $global])

Remove the request with the given isdentifier. Returns true if successful,
false on error.

=cut

_txn remove_request => sub {
   my ($self, $ok, $err, $identifier, $global) = @_;

   $self->serialise ($identifier => sub {
      my ($self, $guard) = @_;

      $self->send_msg (remove_request =>
         identifier => $identifier,
         global     => $global ? "true" : "false",
      );
      $self->on (sub {
         my ($self, $type, $kv, @extra) = @_;

         $guard if 0;

FCP.pm  view on Meta::CPAN


In addition, an event (basically a fake message) of type C<request_changed> is generated
on every change, which will be called as C<< $cb->($fcp, $kv, $type) >>, where C<$type>
is the type of the original message triggering the change,

To fill this cache with the global queue and keep it updated,
call C<watch_global> to subscribe to updates, followed by
C<list_persistent_requests_sync>.

   $fcp->watch_global_sync_; # do not wait
   $fcp->list_persistent_requests; # wait

To get a better idea of what is stored in the cache, here is an example of
what might be stored in C<< $fcp->{req}{"Frost-gpl.txt"} >>:

   {
      identifier     => "Frost-gpl.txt",
      uri            => 'CHK@Fnx5kzdrfE,EImdzaVyEWl,AAIC--8/gpl.txt',
      binary_blob    => "false",
      global         => "true",
      max_retries    => -1,
      max_size       => 9223372036854775807,
      persistence    => "forever",
      priority_class => 3,
      real_time      => "false",

FCP.pm  view on Meta::CPAN

      started        => "true",
      type           => "persistent_get",
      verbosity      => 2147483647,
      sending_to_network => {
         identifier => "Frost-gpl.txt",
         global     => "true",
      },
      compatibility_mode => {
         identifier    => "Frost-gpl.txt",
         definitive    => "true",
         dont_compress => "false",
         global        => "true",
         max           => "COMPAT_1255",
         min           => "COMPAT_1255",
      },
      expected_hashes    => {
         identifier => "Frost-gpl.txt",
         global     => "true",
         hashes     => {
            ed2k   => "d83596f5ee3b7...",
            md5    => "e0894e4a2a6...",
            sha1   => "...",
            sha256 => "...",

FCP.pm  view on Meta::CPAN

            tth    => "...",
         },
      },
      expected_mime      => {
         identifier      => "Frost-gpl.txt",
         global          => "true",
         metadata        => { content_type => "application/rar" },
      },
      expected_data_length => {
         identifier      => "Frost-gpl.txt",
         data_length     => 37576,
         global          => "true",
      },
      simple_progress    => {
         identifier      => "Frost-gpl.txt",
         failed          => 0,
         fatally_failed  => 0,
         finalized_total => "true",
         global          => "true",
         last_progress   => 1438639282628,
         required        => 372,
         succeeded       => 102,
         total           => 747,
      },
      data_found           => {
         identifier      => "Frost-gpl.txt",
         completion_time => 1438663354026,
         data_length     => 37576,
         global          => "true",
         metadata        => { content_type => "image/jpeg" },
         startup_time    => 1438657196167,
      },
   }

FCP.pm  view on Meta::CPAN


   use AnyEvent::FCP;

   my $fcp = new AnyEvent::FCP;

   # let us look at the global request list
   $fcp->watch_global_ (1);

   # list them, synchronously
   my $req = $fcp->list_persistent_requests;

   # go through all requests

 view all matches for this distribution


AnyEvent-FIFO

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN


    no_index    => { 'directory' => [ 'inc' ] },
    name        => 'AnyEvent-FIFO',
    module_name => 'AnyEvent::FIFO',

    script_files => [glob('script/*'), glob('bin/*')],

    test_files           => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt') ? 't/ xt/' : 't/',
    recursive_test_files => 1,
);
if (-d 'share') {

 view all matches for this distribution


AnyEvent-FTP

 view release on metacpan or  search on metacpan

inc/ServerTests.pm  view on Meta::CPAN

use Moose;
use namespace::autoclean;
use 5.010;
use Path::Class qw( file dir );
use YAML qw( LoadFile DumpFile );
use File::Glob qw( bsd_glob );

with 'Dist::Zilla::Role::TestRunner';

sub test
{

inc/ServerTests.pm  view on Meta::CPAN

    $dir->mkpath(0,0700);
    my $old = $test_root->file('t', 'lib.pl');
    my $new = $dir->file('lib.pl');
    symlink $old, $new;

    $old = file( bsd_glob '~/etc/localhost/yml');
    $new = $dir->file('config.yml');

    my $config = LoadFile($old);
    $config->{port} = $service;
    DumpFile($new, $config);
  }

  my @remotes;

  foreach my $remote_config (grep { $_->basename =~ /\.yml$/ } dir(bsd_glob '~/etc')->children)
  {
    next if $remote_config->basename eq 'localhost.yml';
    #$self->zilla->log($remote_config->basename);

    my $name = $remote_config->basename;

 view all matches for this distribution


AnyEvent-FastPing

 view release on metacpan or  search on metacpan

FastPing.pm  view on Meta::CPAN

call the idle callback.

The pinging process works like this: every range has a minimum interval
between sends, which is used to limit the rate at which hosts in that
range are being pinged. Distinct ranges are independent of each other,
which is why there is a per-pinger "global" minimum interval as well.

The pinger sends pings as fats as possible, while both obeying the pinger
rate limit as well as range limits.

When a range is exhausted, it is removed. When all ranges are exhausted,

 view all matches for this distribution


AnyEvent-Feed

 view release on metacpan or  search on metacpan

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


=head2 Known Bugs

There is actually a known bug with encodings of contents of Atom feeds.
L<XML::Atom> by default gives you UTF-8 encoded data. You have to set
this global variable to be able to use the L<XML::Feed::Entry> interface
without knowledge of the underlying feed type:

   $XML::Atom::ForceUnicode = 1;

I've re-reported this bug against L<XML::Feed>, as I think it should

 view all matches for this distribution


AnyEvent-Fork-RPC

 view release on metacpan or  search on metacpan

RPC.pm  view on Meta::CPAN


If you need an external module for serialisation, then you can either
pre-load it into your L<AnyEvent::Fork> process, or you can add a C<use>
or C<require> statement into the serialiser string. Or both.

Here are some examples - all of them are also available as global
variables that make them easier to use.

=over 4

=item C<$AnyEvent::Fork::RPC::STRING_SERIALISER> - octet strings only

 view all matches for this distribution


AnyEvent-Fork

 view release on metacpan or  search on metacpan

Fork.pm  view on Meta::CPAN

The path to the perl interpreter is divined using various methods - first
C<$^X> is investigated to see if the path ends with something that looks
as if it were the perl interpreter. Failing this, the module falls back to
using C<$Config::Config{perlpath}>.

The path to perl can also be overridden by setting the global variable
C<$AnyEvent::Fork::PERL> - it's value will be used for all subsequent
invocations.

=cut

 view all matches for this distribution


AnyEvent-ForkObject

 view release on metacpan or  search on metacpan

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

    my ($self) = @_;
    $self->{destroyed} = 1;
    $self->{handle}->push_write("'bye'\n") if $self->{handle};
    delete $self->{handle};

    return if in_global_destruction;

    # kill zombies
    my $cw;
    $cw = AE::child $self->{pid} => sub {
        my ($pid, $code) = @_;

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


sub DESTROY
{
    # You can call DESTROY by hand
    my ($self, $cb) = @_;
    return if in_global_destruction;
    $cb ||= sub {  };
    my $fo = $self->{fo};
    unless (blessed $$fo) {
        $cb->(fatal => 'Child process was already destroyed');
        return;

 view all matches for this distribution


AnyEvent-FriendFeed-Realtime

 view release on metacpan or  search on metacpan

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

		@exts = $self->{admin}->load_all_extensions;
	}

	my %seen;
	foreach my $obj ( @exts ) {
		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
			next unless $obj->can($method);
			next if $method =~ /^_/;
			next if $method eq uc($method);
			$seen{$method}++;
		}

 view all matches for this distribution


AnyEvent-Gearman-WorkerPool

 view release on metacpan or  search on metacpan

lib/AnyEvent/Gearman/WorkerPool.pm  view on Meta::CPAN

has reporters=>(is=>'rw');
sub BUILD{
    my $self = shift;

    my $conf = $self->config;
    my %global = %{$conf->{'global'}};
    my %baseconf = (
        job_servers=>[''],
        min=>1,
        max=>1,
        workleft=>0,
    );
    %global = (%baseconf,%global);
    
    my @reporters;
    my %confs = %{$conf->{slots}};
    foreach my $worker (keys %confs){
        my %conf = %{$confs{$worker}};

        %conf = (%global,%conf);
        DEBUG Dumper(\%conf);

        my @slots;
        foreach (0 .. $conf{max}-1){
            my $slot = AnyEvent::Gearman::WorkerPool::Slot->new(

lib/AnyEvent/Gearman/WorkerPool.pm  view on Meta::CPAN

	};

	my $pool = AnyEvent::Gearman::WorkerPool->new(
		config=>
		{   
			global=>{ # common config
				job_servers=>['localhost'], # gearmand servers
				libs=>['./lib'], # perl5 library paths
				max=>3, # max workers
				},  
			slots=>{
				'TestWorker'=>{ # module package name which extends AnyEvent::Gearman::WorkerPool::Worker.
					min=>20, # min workers, count when started.
					max=>50, # overrides global config's max. Workers will extend when all workers are busy.
					workleft=>10, # workleft is life of worker. A worker will be respawned after used 10 times. 
								# if workleft is set as 0, a worker will be never respawned.
								# this feature is useful if worker code may has some memory leaks.
				},
				# you can place more worker modules here.

 view all matches for this distribution


AnyEvent-Gearman

 view release on metacpan or  search on metacpan

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

		@exts = $self->{admin}->load_all_extensions;
	}

	my %seen;
	foreach my $obj ( @exts ) {
		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
			next unless $obj->can($method);
			next if $method =~ /^_/;
			next if $method eq uc($method);
			$seen{$method}++;
		}

 view all matches for this distribution


AnyEvent-Git-Wrapper

 view release on metacpan or  search on metacpan

t/basic_nb.t  view on Meta::CPAN

use POSIX qw(strftime);
use Sort::Versions;
use Test::Deep;
use Test::Exception;

#my $global_timeout = AE::timer 30, 0, sub { say STDERR "TIMEOUT!"; exit 2 };

my $dir = tempdir(CLEANUP => 1);

my $git = AnyEvent::Git::Wrapper->new($dir);

 view all matches for this distribution


AnyEvent-Gmail-Feed

 view release on metacpan or  search on metacpan

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

		@exts = $admin->load_all_extensions;
	}

	my %seen;
	foreach my $obj ( @exts ) {
		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
			next unless $obj->can($method);
			next if $method =~ /^_/;
			next if $method eq uc($method);
			$seen{$method}++;
		}

 view all matches for this distribution


AnyEvent-Groonga

 view release on metacpan or  search on metacpan

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

		@exts = $self->{admin}->load_all_extensions;
	}

	my %seen;
	foreach my $obj ( @exts ) {
		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
			next unless $obj->can($method);
			next if $method =~ /^_/;
			next if $method eq uc($method);
			$seen{$method}++;
		}

 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

=head1 DESCRIPTION

When you use Coro you have a choice: you can use L<Coro::LWP> or L<AnyEvent::HTTP>
(if you want to make asynchronous HTTP requests).
If you use Coro::LWP, some modules may work incorrectly (for example Cache::Memcached)
because of global change of IO::Socket behavior.
AnyEvent::HTTP uses different programming interface, so you must change more of your
old code with LWP::UserAgent (and HTTP::Request and so on), if you want to make
asynchronous code.

AnyEvent::HTTP::LWP::UserAgent uses AnyEvent::HTTP inside but have an interface of

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


New versions of C<AnyEvent::HTTP> supports HTTP(S)/1.1 persistent connection, so
you can control it in C<AnyEvent::HTTP::LWP::UserAgent> using C<conn_cache> method.

If you set C<conn_cache> (as C<LWP::ConnCache> object) then
C<Anyevent::HTTP::LWP::UserAgent> makes two things. In first it sets global variable
C<$AnyEvent::HTTP::ACTIVE> as you setted C<total_capacity> for C<conn_cache> (be careful:
this have a global consequences, not local). And in the second C<AnyEvent::HTTP::LWP::UserAgent>
will create persistent connections if your C<$ua> have C<conn_cache> (local propery of C<$ua>).

But you can't use remainder methods of your C<conn_cache>, all connections will
contains in C<AnyEvent::HTTP>. C<$AnyEvent::HTTP::ACTIVE> sets only when you set
C<conn_cache> for C<$ua>. If you just change C<total_capacity> of old C<conn_cache>

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

=head1 LIMITATIONS AND DETAILS

Some features of LWP::UserAgent can be broken (C<protocols_forbidden> or something else).
Precise documentation and realization of these features will come in the future.

You can use some AnyEvent::HTTP global function and variables.
But use C<agent> of UA instead of C<$AnyEvent::HTTP::USERAGENT> and C<max_redirect>
instead of C<$AnyEvent::HTTP::MAX_RECURSE>.

Content in request can be specified by code reference.
This is the same as L<LWP::UserAgent> but there are some limitations.

 view all matches for this distribution


AnyEvent-HTTP-MXHR

 view release on metacpan or  search on metacpan

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

		@exts = $self->{admin}->load_all_extensions;
	}

	my %seen;
	foreach my $obj ( @exts ) {
		while (my ($method, $glob) = each %{ref($obj) . '::'}) {
			next unless $obj->can($method);
			next if $method =~ /^_/;
			next if $method eq uc($method);
			$seen{$method}++;
		}

 view all matches for this distribution


AnyEvent-HTTP-Socks

 view release on metacpan or  search on metacpan

lib/AnyEvent/HTTP/Socks.pm  view on Meta::CPAN

=head1 DESCRIPTION

This module adds new `socks' option to all http_* functions exported by AnyEvent::HTTP.
So you can specify socks proxy for HTTP requests.

This module uses IO::Socket::Socks as socks library, so any global variables like
$IO::Socket::Socks::SOCKS_DEBUG can be used to change the behavior.

Socks string structure is:

  scheme://login:password@host:port

 view all matches for this distribution


AnyEvent-HTTP

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

          timeout (testcase by Cindy Wang).
        - destroying the guard would have no effect when a request was
          recursing or being retired.

2.04 Sat Feb 19 07:45:24 CET 2011
	- "proxy => undef" now overrides any global proxy when specified.
        - require scheme in urls, also use a stricter match to match urls,
          leading or trailing garbage is no longer tolerated.
        - EXPERIMENTAL: allow '=' in cookie values.

2.03 Tue Jan 18 18:49:35 CET 2011

 view all matches for this distribution


AnyEvent-HTTPD-ExtDirect

 view release on metacpan or  search on metacpan

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

To configure an AnyEvent::HTTPD::ExtDirect instance, you will need to
create an instance of L<RPC::ExtDirect::Config> with all required
options set, and pass it to AnyEvent::HTTPD::ExtDirect
L<constructor|/new> to be used. This step is optional; by default the
Config instance in the
L<global API instance|RPC::ExtDirect::API/"GLOBAL API TREE INSTANCE">
will be used instead.

Refer to L<RPC::ExtDirect::Config/OPTIONS> for the list of
configuration options and their default values.

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

=over 8

=item C<api>

Optional L<RPC::ExtDirect::API> instance to be used instead of the
default L<global API tree|RPC::ExtDirect::API/"GLOBAL API TREE INSTANCE">.

=item C<config>

Optional L<RPC::ExtDirect::Config> instance to be used. If not provided,
the Config instance in the API object (either default or passed in L</api>

 view all matches for this distribution


AnyEvent-Handle-Throttle

 view release on metacpan or  search on metacpan

lib/AnyEvent/Handle/Throttle.pm  view on Meta::CPAN

    }
    sub upload_total   { $_[0]->{upload_total} }
    sub download_total { $_[0]->{download_total} }
    sub upload_speed   { $_[0]->{upload_speed} }
    sub download_speed { $_[0]->{download_speed} }
    my ($global_upload_total, $global_download_total,
        $global_upload_limit, $global_download_limit,
        $global_upload_speed, $global_download_speed
    );
    my $global_period = 1;

    sub global_upload_limit {
        $_[1] ? $global_upload_limit = $_[1] : $global_upload_limit;
    }

    sub global_download_limit {
        $_[1] ? $global_download_limit = $_[1] : $global_download_limit;
    }
    sub global_upload_total   {$global_upload_total}
    sub global_download_total {$global_download_total}
    sub global_upload_speed   {$global_upload_speed}
    sub global_download_speed {$global_download_speed}
    my ($global_read_size,     $global_write_size,
        $global__upload_speed, $global__download_speed);
    my $global_reset_cb = sub {
        $global_read_size      = $global_download_limit;
        $global_write_size     = $global_upload_limit || 8 * 1024;
        $global_upload_speed   = $global__upload_speed;
        $global_download_speed = $global__download_speed;
        $global__upload_speed  = $global__download_speed = 0;
    };
    $global_reset_cb->();
    our $global_reset = AE::timer(0, $global_period, $global_reset_cb);

    sub _start {
        my $self  = shift;
        my $reset = sub {
            $self->{read_size}      = $self->{download_limit};

lib/AnyEvent/Handle/Throttle.pm  view on Meta::CPAN

    sub start_read {
        my ($self) = @_;
        unless ($self->{_rw} || $self->{_eof} || !$self->{fh}) {
            Scalar::Util::weaken $self;
            $self->{_rw} = AE::io $self->{fh}, 0, sub {
                my ($read) = sort grep {defined} $global_read_size,
                    $self->{read_size};
                my ($period) = sort grep {defined} $global_period,
                    $self->{_period};
                if (defined $read && $read <= 0) {
                    $self->stop_read;
                    return $self->{_pause_read} = AE::timer(
                        $period, 0,

lib/AnyEvent/Handle/Throttle.pm  view on Meta::CPAN

                my $len = sysread $self->{fh}, $$rbuf, $read || 8192,
                    length $$rbuf;
                if (defined $len) {
                    if ($len > 0) {
                        $self->{read_size} -= $len;
                        $global_read_size  -= $len;
                        $self->{download_total}  += $len;
                        $global_download_total   += $len;
                        $self->{_download_speed} += $len;
                        $global__download_speed  += $len;
                        $self->{_activity} = $self->{_ractivity} = AE::now;
                        if ($self->{tls}) {
                            Net::SSLeay::BIO_write($self->{_rbio}, $$rbuf);
                            &_dotls($self);
                        }

lib/AnyEvent/Handle/Throttle.pm  view on Meta::CPAN

            my $poll = sub {
                $self->{_ww} = AE::io $self->{fh}, 1, $cb
                    if length $self->{wbuf};
            };
            $cb = sub {
                my ($write) = sort grep {defined} $global_write_size,
                    $self->{write_size};
                my ($period) = sort grep {defined} $global_period,
                    $self->{_period};
                if (defined $write && $write <= 0) {
                    if (length $self->{wbuf}) {
                        delete $self->{_ww};
                        return $self->{_pause_ww} = AE::timer(

lib/AnyEvent/Handle/Throttle.pm  view on Meta::CPAN

                    return 1;
                }
                my $len = syswrite $self->{fh}, $self->{wbuf}, $write;
                if (defined $len) {
                    $self->{write_size} -= $len;
                    $global_write_size  -= $len;
                    $self->{upload_total}  += $len;
                    $global_upload_total   += $len;
                    $self->{_upload_speed} += $len;
                    $global__upload_speed  += $len;
                    substr $self->{wbuf}, 0, $len, "";
                    $self->{_activity} = $self->{_wactivity} = AE::now;
                    $self->{on_drain}($self)
                        if $self->{low_water_mark}
                            || 0 >= length($self->{wbuf} || '')

lib/AnyEvent/Handle/Throttle.pm  view on Meta::CPAN

limit bandwidth and realize you'd rather set flat limits on the B<total>
bandwidth instead of per-handle, try these methods:

=over

=item AnyEvent::Handle::Throttle->B<global_upload_limit>( $bytes )

Sets/returns the current global upload rate in bytes per period.

=item AnyEvent::Handle::Throttle->B<global_download_limit>( $bytes )

Sets/returns the current global download rate in bytes per period.

=item $bytes = $handle->B<global_upload_speed>( )

Returns the amount of data written through all
L<AnyEvent::Handle::Throttle|AnyEvent::Handle::Throttle> objects during the
previous period.

=item $bytes = $handle->B<global_download_speed>( )

Returns the amount of data read through all
L<AnyEvent::Handle::Throttle|AnyEvent::Handle::Throttle> objects during the
previous period.

lib/AnyEvent/Handle/Throttle.pm  view on Meta::CPAN

=item $bytes = $handle->B<upload_total>( )

Returns the total amount of data written through the
L<AnyEvent::Handle::Throttle|AnyEvent::Handle::Throttle> object.

=item $bytes = $handle->B<global_download_total>( )

Returns the total amount of data read through all
L<AnyEvent::Handle::Throttle|AnyEvent::Handle::Throttle> objects so far.

=item $bytes = $handle->B<global_upload_total>( )

Returns the total amount of data sent through all
L<AnyEvent::Handle::Throttle|AnyEvent::Handle::Throttle> objects so far.

=back

 view all matches for this distribution


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