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


AnyEvent-Mattermost

 view release on metacpan or  search on metacpan

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


=cut

=head2 new

    $mconn = AnyEvent::Mattermost->new( $host, $team, $email, $password );

Creates a new AnyEvent::Mattermost object. No connections are opened and no
callbacks are registered yet.

The C<$host> parameter must be the HTTP/HTTPS URL of your Mattermost server. If

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


C<$email> must be the email address of the account to be used for logging into
the Mattermost server. The short username is not supported for logins via the
Mattermost APIs, only the email address.

C<$password> is hopefully self-explanatory.

=cut

sub new {
    my ($class, $host, $team, $user, $pass) = @_;

    croak "must provide a Mattermost server address"
        unless defined $host && length($host) > 0;
    croak "must provide a Mattermost team name"
        unless defined $team && length($team) > 0;
    croak "must provide a login email and password"
        unless defined $user && defined $pass && length($user) > 0 && length($pass) > 0;

    $host = "https://$host" unless $host =~ m{^https?://}i;
    $host .= '/' unless substr($host, -1, 1) eq '/';

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

    my ($self) = @_;

    my $data = $self->_post('api/v3/users/login', {
        name     => $self->{'team'},
        login_id => $self->{'user'},
        password => $self->{'pass'},
    });

    croak "could not log in" unless exists $self->{'token'};

    my $userdata = $self->_get('api/v3/users/initial_load');

 view all matches for this distribution


AnyEvent-MySQL-ConnPool

 view release on metacpan or  search on metacpan

lib/AnyEvent/MySQL/ConnPool.pm  view on Meta::CPAN


Returns connected L<AnyEvent::ConnPool> object. 
All options for connect_pool are similar to the AnyEvent::MySQL->connect method.
But pool accepts additional options in parameters hashref(4th parameter).

    AnyEvent::MySQL->connect_pool($dsn, $user, $password, {PoolSize => 5, CheckInterval => 10, Dispatcher => 0}, $callback);

PoolSize    =>  how many connections should be created. 5 connections by default.

CheckInterval   =>  Interval for ping connections. 10 seconds by default.

lib/AnyEvent/MySQL/ConnPool.pm  view on Meta::CPAN


=item B<new>

Same thing as connect_pool.
    
    my $connpool = AnyEvent::MySQL::ConnPool->new($dsn, $user, $password, {PoolSize => 5, CheckInterval => 10, Dispatcher => 0}, $callback);

=cut

sub new {
        my ($caller, $dsn, $user, $password, $params, $cb) = @_;

        my @conn_args = @_;
        shift @conn_args;

        my $pool_size = delete $params->{PoolSize};

 view all matches for this distribution


AnyEvent-MySQL

 view release on metacpan or  search on metacpan

lib/AnyEvent/MySQL/Imp.pm  view on Meta::CPAN

use constant {
    DEV => 0,
};

use constant {
    CLIENT_LONG_PASSWORD      =>      1, # new more secure passwords +
    CLIENT_FOUND_ROWS         =>      2, # Found instead of affected rows *
    CLIENT_LONG_FLAG          =>      4, # Get all column flags * +
    CLIENT_CONNECT_WITH_DB    =>      8, # One can specify db on connect +
    CLIENT_NO_SCHEMA          =>     16, # Don't allow database.table.column
    CLIENT_COMPRESS           =>     32, # Can use compression protocol *

lib/AnyEvent/MySQL/Imp.pm  view on Meta::CPAN

            $fetch_row->();
        }
    });
}

=head2 do_auth($hd, $username, [$password, [$database,]] $cb->($success, $err_num_and_msg, $thread_id))
=cut
sub do_auth {
    my $cb = ref($_[-1]) eq 'CODE' ? pop : sub {};
    my($hd, $username, $password, $database) = @_;

    recv_packet($hd, sub {
        if( DEV ) {
            my $hex = $_[0];
            $hex =~ s/(.)/sprintf"%02X ",ord$1/ges;

lib/AnyEvent/MySQL/Imp.pm  view on Meta::CPAN

        }
        my $scramble_len = take_num($_[0], 1); warn "scramble_len:$scramble_len" if DEV;

        my $packet = '';
        put_num($packet, $server_cap & (
            CLIENT_LONG_PASSWORD     | # new more secure passwords
            CLIENT_FOUND_ROWS        | # Found instead of affected rows
            CLIENT_LONG_FLAG         | # Get all column flags
            CLIENT_CONNECT_WITH_DB   | # One can specify db on connect
            # CLIENT_NO_SCHEMA         | # Don't allow database.table.column
            # CLIENT_COMPRESS          | # Can use compression protocol

lib/AnyEvent/MySQL/Imp.pm  view on Meta::CPAN

        ), 4); # client_flags
        put_num($packet, 0x1000000, 4); # max_packet_size
        put_num($packet, $server_lang, 1); # charset_number
        $packet .= "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; # filler
        put_zstr($packet, $username); # username
        if( $password eq '' ) {
            put_lcs($packet, '');
        }
        else {
            my $stage1_hash = sha1($password);
            put_lcs($packet, sha1($scramble_buff.sha1($stage1_hash)) ^ $stage1_hash); # scramble buff
        }
        put_zstr($packet, $database); # database name

        send_packet($hd, 1, $packet);

 view all matches for this distribution


AnyEvent-Net-Curl-Queued

 view release on metacpan or  search on metacpan

eg/queue  view on Meta::CPAN

http://localhost/manual/pt-br/mod/mod_auth_basic.html
http://localhost/manual/es/urlmapping.html
http://localhost/manual/pt-br/misc/password_encryptions.html
http://localhost/manual/pt-br/howto/access.html
http://localhost/manual/ja/programs/ab.html
http://localhost/manual/ja/suexec.html
http://localhost/manual/zh-cn/programs/httpd.html
http://localhost/manual/es/vhosts/fd-limits.html

eg/queue  view on Meta::CPAN

http://localhost/manual/ko/env.html
http://localhost/manual/en/mod/mpm_winnt.html
http://localhost/manual/pt-br/filter.html
http://localhost/manual/tr/mod/mod_proxy.html
http://localhost/manual/zh-cn/mod/mod_proxy.html
http://localhost/manual/es/misc/password_encryptions.html
http://localhost/manual/tr/mod/mod_so.html
http://localhost/manual/tr/faq/index.html
http://localhost/manual/en/howto/ssi.html
http://localhost/manual/zh-cn/mod/mod_authz_owner.html
http://localhost/manual/ko/mod/mod_proxy_balancer.html

eg/queue  view on Meta::CPAN

http://localhost/manual/ko/rewrite/advanced.html
http://localhost/manual/tr/suexec.html
http://localhost/manual/ja/mod/mod_example.html
http://localhost/manual/fr/mod/mod_proxy_http.html
http://localhost/manual/ko/mod/mod_authn_dbm.html
http://localhost/manual/ko/misc/password_encryptions.html
http://localhost/manual/ko/mod/mod_example.html
http://localhost/manual/zh-cn/programs/dbmmanage.html
http://localhost/manual/ko/rewrite/proxy.html
http://localhost/manual/zh-cn/mod/mod_usertrack.html
http://localhost/manual/es/mod/mpmt_os2.html

eg/queue  view on Meta::CPAN

http://localhost/manual/tr/rewrite/advanced.html
http://localhost/manual/es/mod/prefork.html
http://localhost/manual/pt-br/mod/mod_negotiation.html
http://localhost/manual/fr/mod/mod_cern_meta.html
http://localhost/manual/tr/rewrite/tech.html
http://localhost/manual/en/misc/password_encryptions.html
http://localhost/manual/zh-cn/caching.html
http://localhost/manual/fr/programs/httxt2dbm.html
http://localhost/manual/pt-br/programs/other.html
http://localhost/manual/zh-cn/mod/mod_ident.html
http://localhost/manual/de/mod/mod_proxy_scgi.html

eg/queue  view on Meta::CPAN

http://localhost/manual/ja/dso.html
http://localhost/manual/de/license.html
http://localhost/manual/es/mod/module-dict.html
http://localhost/manual/ko/mpm.html
http://localhost/manual/fr/vhosts/examples.html
http://localhost/manual/zh-cn/misc/password_encryptions.html
http://localhost/manual/fr/mod/mod_example.html
http://localhost/manual/en/howto/index.html
http://localhost/manual/tr/mod/mod_isapi.html
http://localhost/manual/fr/mod/mod_ldap.html
http://localhost/manual/en/mod/mod_substitute.html

eg/queue  view on Meta::CPAN

http://localhost/manual/tr/mod/core.html
http://localhost/manual/ko/programs/htdigest.html
http://localhost/manual/en/mod/mod_dbd.html
http://localhost/manual/tr/mod/mod_headers.html
http://localhost/manual/fr/server-wide.html
http://localhost/manual/tr/misc/password_encryptions.html
http://localhost/manual/ja/mod/mod_cern_meta.html
http://localhost/manual/tr/developer/documenting.html
http://localhost/manual/pt-br/programs/htpasswd.html
http://localhost/manual/tr/mod/mod_authn_dbd.html
http://localhost/manual/fr/new_features_2_2.html

 view all matches for this distribution


AnyEvent-Net-MPD

 view release on metacpan or  search on metacpan

lib/AnyEvent/Net/MPD.pm  view on Meta::CPAN

    shift_read   => 'shift',
    unshift_read => 'unshift',
  },
);

has password => (
  is => 'ro',
  isa => Maybe[Str],
  lazy => 1,
);

lib/AnyEvent/Net/MPD.pm  view on Meta::CPAN

  is => 'ro',
  init_arg => undef,
  lazy => 1,
  default => sub {
    my $self = shift;
      ( $self->password ? $self->password . '@' : q{} )
    . $self->host
    . ( $self->port     ? ':' . $self->port     : q{} )
  },
);

lib/AnyEvent/Net/MPD.pm  view on Meta::CPAN

        if ($line =~ /^OK/) {
          if ($line =~ /OK MPD (.*)/) {
            $log->trace('Connection established');
            $self->{version} = $1;

            $self->send( password => $self->password )
              if $self->password and $self->state ne 'ready';

            $self->state( 'ready' );
          }
          else {
            $self->shift_read->( \@buffer );

lib/AnyEvent/Net/MPD.pm  view on Meta::CPAN


=item B<port>

The port to connect to. Defaults to B<6600>.

=item B<password>

The password to use to connect to the server. Defaults to undefined, which
means to use no password.

=item B<auto_connect>

If set to true, the constructor will block until the connection to the MPD
server has been established. Defaults to false.

 view all matches for this distribution


AnyEvent-Pg-Pool-Multiserver

 view release on metacpan or  search on metacpan

example/ex.pl  view on Meta::CPAN


my $servers = [
  {
    id   => 1,
    name => 'remote 1',
    conn => 'host=remote1 port=5432 dbname=mydb user=myuser password=mypass',
  },
  {
    id   => 2,
    name => 'remote 2',
    conn => 'host=remote2 port=5432 dbname=mydb user=myuser password=mypass',
  },
];
my $pool = AnyEvent::Pg::Pool::Multiserver->new( servers => $servers, local => 1 );

my $cv;

 view all matches for this distribution


AnyEvent-PgRecvlogical

 view release on metacpan or  search on metacpan

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


=item L<Str|Types::Standard/Str>

=back

=item C<password>

=over

=item L<Str|Types::Standard/Str>

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


has dbname   => (is => 'ro', isa => Str, required  => 1);
has host     => (is => 'ro', isa => Str, predicate => 1);
has port     => (is => 'ro', isa => Int, predicate => 1);
has username => (is => 'ro', isa => Str, default   => q{});
has password => (is => 'ro', isa => Str, default   => q{});
has slot     => (is => 'ro', isa => Str, required  => 1);

has dbh                => (is => 'lazy', isa => $DBH, clearer => 1, init_arg => undef);
has do_create_slot     => (is => 'ro',   isa => Bool,    default   => 0);
has slot_exists_ok     => (is => 'ro',   isa => Bool,    default   => 0);

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

    return 'dbi:Pg:' . join q{;}, map { "$_=$dsn{$_}" } sort keys %dsn;
}

sub _build_dbh {
    my $self = shift;
    my $dbh  = DBI->connect($self->_dsn, $self->username, $self->password, { PrintError => 0 },);

    croak $DBI::errstr unless $dbh;

    return $dbh;
}

 view all matches for this distribution


AnyEvent-Plurk

 view release on metacpan or  search on metacpan

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


   unless (defined $self->{username}) {
      croak "no 'username' given to AnyEvent::Plurk\n";
   }

   unless (defined $self->{password}) {
      croak "no 'password' given to AnyEvent::Plurk\n";
   }

   $self->{__cookie_jar} = {};
   return $self
}

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

    my $cb   = shift;

    $self->send_request(
        "Users/login", {
            username => $self->{username},
            password => $self->{password}
        }
    )
}

sub _start_polling {

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


=head1 SYNOPSIS

    my $p = AnyEvent::Plurk->new(
        username => $username,
        password => $password
    );
    $p->reg_cb(
        unread_plurks => sub {
            my ($p, $plurks) = @_;
            is(ref($plurks), "ARRAY", "Received latest plurks");

 view all matches for this distribution


AnyEvent-Porttracker

 view release on metacpan or  search on metacpan

Porttracker.pm  view on Meta::CPAN

the specified host (see below). After the connection has been established,
the TLS handshake (if requested) will take place, followed by a login
attempt using either the C<none>, C<login_cram_md6> or C<login> methods,
in this order of preference (typically, C<login_cram_md6> is used, which
shields against some man-in-the-middle attacks and avoids transferring the
password).

It is permissible to send requests immediately after creating the object -
they will be queued until after successful login.

Possible key-value pairs are:

Porttracker.pm  view on Meta::CPAN


The service (port) to use (default: C<porttracker=55>).

=item user => $string, pass => $string

These are the username and password to use when authentication is required
(which it is in almost all cases, so these keys are normally mandatory).

=item tls => $bool

Enables or disables TLS (default: disables). When enabled, then the

 view all matches for this distribution


AnyEvent-Processor

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this

 view all matches for this distribution


AnyEvent-RabbitMQ-Simple

 view release on metacpan or  search on metacpan

lib/AnyEvent/RabbitMQ/Simple.pm  view on Meta::CPAN


    my $rmq = AnyEvent::RabbitMQ::Simple->new(
        host       => '127.0.0.1',
        port       => 5672,
        user       => 'username',
        pass       => 'password',
        vhost      => '/',
        timeout    => 1,
        tls        => 0,
        verbose    => 0,
        confirm_publish => 1,

 view all matches for this distribution


AnyEvent-Redis-RipeRedis

 view release on metacpan or  search on metacpan

examples/eval.pl  view on Meta::CPAN

my $cv = AE::cv();

my $redis = AnyEvent::Redis::RipeRedis->new(
  host     => 'localhost',
  port     => 6379,
  password => 'redis_pass',

  on_connect => sub {
    print "Connected to Redis server\n";
  },

 view all matches for this distribution



AnyEvent-RipeRedis-Cluster

 view release on metacpan or  search on metacpan

lib/AnyEvent/RipeRedis/Cluster.pm  view on Meta::CPAN

  $self->{on_node_disconnect} = $params{on_node_disconnect};
  $self->{on_node_error}      = $params{on_node_error};
  $self->on_error( $params{on_error} );

  my %node_params;
  foreach my $name ( qw( password utf8 connection_timeout read_timeout
      reconnect reconnect_interval handle_params ) )
  {
    next unless defined $params{$name};
    $node_params{$name} = $params{$name};
  }

lib/AnyEvent/RipeRedis/Cluster.pm  view on Meta::CPAN

    startup_nodes => [
      { host => 'localhost', port => 7000 },
      { host => 'localhost', port => 7001 },
      { host => 'localhost', port => 7002 },
    ],
    password           => 'yourpass',
    connection_timeout => 5,
    read_timeout       => 5,
    refresh_interval   => 5,
    lazy               => 1,
    reconnect_interval => 5,

lib/AnyEvent/RipeRedis/Cluster.pm  view on Meta::CPAN

contain C<host> and C<port> elements. The client will try to connect to random
node from the list to retrieve information about all cluster nodes and slots
mapping. If the client could not connect to first selected node, it will try
to connect to another random node from the list.

=item password => $password

If the password is specified, the C<AUTH> command is sent to all nodes
of the cluster after connection.

=item allow_slaves => $boolean

If enabled, the client will try to send read-only commands to slave nodes.

 view all matches for this distribution


AnyEvent-RipeRedis

 view release on metacpan or  search on metacpan

examples/eval.pl  view on Meta::CPAN

my $cv = AE::cv;

my $redis = AnyEvent::RipeRedis->new(
  host     => 'localhost',
  port     => 6379,
  password => 'redis_pass',

  on_connect => sub {
    print "Connected to Redis server\n";
  },

 view all matches for this distribution


AnyEvent-SIP

 view release on metacpan or  search on metacpan

t/08_register_with_auth.t  view on Meta::CPAN

	my ($lsock,$laddr,$peer) = @_;
	my $ua = Simple->new( leg => $lsock );
	my $auth = Authorize->new(
		dispatcher => $ua->{dispatcher},
		user2a1   => { '007' => md5_hex('007:REALM.example.com:secret') },
		user2pass => sub { $_[0] eq 'wolf' ? 'lobo' : 'no-useful-password' },
		realm => 'REALM.example.com',
		opaque => 'HumptyDumpty',
		i_am_proxy => 0,
	);
	my $auth_chain = ReceiveChain->new(

 view all matches for this distribution


AnyEvent-SOCKS-Client

 view release on metacpan or  search on metacpan

lib/AnyEvent/SOCKS/Client.pm  view on Meta::CPAN

};

sub _parse_uri{
	my $re = qr!socks(4|4a|5)://(?:([^\s:]+):([^\s@]*)@)?(\[[0-9a-f:.]+\]|[^\s:]+):(\d+)!i ;
	if( $_[0] =~ m/$re/gi ){
		my $p = {v => $1, login => $2, password => $3, host => $4, port => $5};
		$p->{host} =~ s/^\[|\]$//g;
		return $p;
	}
	undef ;
}

lib/AnyEvent/SOCKS/Client.pm  view on Meta::CPAN


sub handshake{
	my( $self ) = @_;
	my $that = $self->{chain}->[0] ;
	my @auth_methods = 0 ;
	if($that->{login} and $that->{password}){
		push @auth_methods, AUTH_LOGIN ;
	}
	$self->{hd}->push_write( 
		pack('CC', 5, scalar @auth_methods ) . join( "", map( pack( 'C', $_ ), @auth_methods ))
	);

lib/AnyEvent/SOCKS/Client.pm  view on Meta::CPAN

}

sub auth{
	my( $self, $method ) = @_;
	my $that = $self->{chain}->[0] ;
	if( $method == AUTH_LOGIN and $that->{login} and $that->{password}){
		$self->{hd}->push_write( 
			pack('CC', 5, length $that->{login} ) . $that->{login} 
			. pack('C', length $that->{password}) . $that->{password} 
		);
		$self->{hd}->push_read( chunk => 2, sub{
			my $status = unpack('xC', $_[1]) ;
			if( $status == 0 ){
				$self->connect_cmd ;
				return ;
			}
			AE::log "error" => "Bad login or password";
		});
		return ;
	}
	AE::log "error" => "Auth method $method not implemented!";
}

 view all matches for this distribution


AnyEvent-SSH2

 view release on metacpan or  search on metacpan

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

    unless ($ssh->{config}->get('protocol')) {
        $ssh->{config}->set('protocol',
            PROTOCOL_SSH1 | PROTOCOL_SSH2 | PROTOCOL_SSH1_PREFERRED);
    }

    unless (defined $ssh->{config}->get('password_prompt_login')) {
        $ssh->{config}->set('password_prompt_login', 1);
    }
    unless (defined $ssh->{config}->get('password_prompt_host')) {
        $ssh->{config}->set('password_prompt_host', 1);
    }

    unless (defined $ssh->{config}->get('number_of_password_prompts')) {
        $ssh->{config}->set('number_of_password_prompts', 3);
    }

    # login
    if (!defined $ssh->{config}->get('user')) {
        $ssh->{config}->set('user',
            defined $arg{user} ? $arg{user} : _current_user());
    }
    if (!defined $arg{pass} && exists $CONFIG->{ssh_password}) {
        $arg{pass} = $CONFIG->{ssh_password};
    }
    $ssh->{config}->set('pass', $arg{pass});

    #my $suppress_shell = $_[2];
}

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

    unless (my $if = $ssh->{config}->get('identity_files')) {
        defined $home or croak "Cannot determine home directory, please set the environment variable HOME";
        $ssh->{config}->set('identity_files', [ "$home/.ssh/id_dsa" ]);
    }

    for my $a (qw( password dsa kbd_interactive )) {
        $ssh->{config}->set("auth_$a", 1)
            unless defined $ssh->{config}->get("auth_$a");
    }
}

 view all matches for this distribution


AnyEvent-Stomper

 view release on metacpan or  search on metacpan

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


The user identifier used to authenticate against a secured STOMP server.

=item passcode => $passcode

The password used to authenticate against a secured STOMP server.

=item vhost => $vhost

The name of a virtual host that the client wishes to connect to.

 view all matches for this distribution


AnyEvent-Subprocess

 view release on metacpan or  search on metacpan

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

arbitrary file descriptor number in the child.  You have an infinite
number of these, so you can capture the child's stdout and stderr,
write to its stdin, and also share a socket for out-of-band
communication.  You can also open a pipe to the child's fd #5 and
write to it.  (This is nice if you are invoking something like C<gpg>
that wants the password written on an arbitrary fd other than 1.)

(This is all done with the included C<Handle> delegate.  See
L<AnyEvent::Subprocess::Job::Delegate::Handle>.)

You can then build upon this; instead of writing your own code to

 view all matches for this distribution


AnyEvent-Superfeedr

 view release on metacpan or  search on metacpan

eg/import-opml.pl  view on Meta::CPAN

use strict;
use AnyEvent::Superfeedr;
use XML::OPML::LibXML;

my($opml, $jid, $pass) = @ARGV;
$opml && $jid && $pass or die "Usage: $0 OPML JID password";

my $parser = XML::OPML::LibXML->new;
my $doc = $parser->parse_file($opml);

my @feeds;
$doc->walkdown(sub { push @feeds, $_[0]->xml_url if defined $_[0]->xml_url });

my $superfeedr = AnyEvent::Superfeedr->new(
    debug => $ENV{ANYEVENT_SUPERFEEDR_DEBUG},
    jid => $jid,
    password => $pass,
);

my $end = AnyEvent->condvar;
$end->begin for @feeds;
$superfeedr->connect( sub {

 view all matches for this distribution


AnyEvent-Task

 view release on metacpan or  search on metacpan

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


    $checkout->hash('secret',
      sub {
        my ($checkout, $crypted) = @_;

        print "Hashed password is $crypted\n";

        $checkout->verify($crypted, 'secret',
          sub {
            my ($checkout, $result) = @_;
            print "Verify result is $result\n";

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


    $cv->recv;

=head2 Output

    Hashed password is $2a$10$NwTOwxmTlG0Lk8YZMT29/uysC9RiZX4jtWCx.deBbb2evRjCq6ovi
    Verify result is 1




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

    };

    if ($@) {
      say "hash failed: $@";
    } else {
      say "hashed password is $crypted";
    }

But in an asynchronous program, typically C<hash> would initiate some kind of asynchronous operation and then return immediately, allowing the program to go about other tasks while waiting for the result. Since the error might come back at any time i...

AnyEvent::Task accomplishes this mapping with L<Callback::Frame>.

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


    frame(code => sub {

      $client->checkout->hash('secret', sub {
        my ($checkout, $crypted) = @_;
        say "Hashed password is $crypted";
      });

    }, catch => sub {

      my $back_trace = shift;

 view all matches for this distribution


AnyEvent-Twitter-Stream

 view release on metacpan or  search on metacpan

eg/track.pl  view on Meta::CPAN

    $AnyEvent::Twitter::Stream::STREAMING_SERVER = $ENV{FIREHOSE_SERVER};
}

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",
    %args,
    use_compression => 1,
    on_tweet => sub {
        my $tweet = shift;

 view all matches for this distribution


AnyEvent-UWSGI

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this

 view all matches for this distribution


AnyEvent-WebService-ImKayac

 view release on metacpan or  search on metacpan

lib/AnyEvent/WebService/ImKayac.pm  view on Meta::CPAN

=head1 SYNOPSIS

  use AnyEvent::WebService::ImKayac;

  my $im = AnyEvent::WebService::ImKayac->new(
    type     => 'password',
    user     => '...',
    password => '...'
  );

  $im->send( message => 'Hello! test send!!', cb => sub {
      my ($hdr, $json, $reason) = @_;

lib/AnyEvent/WebService/ImKayac.pm  view on Meta::CPAN

=head2 METHODS

=head3 new

You must pass C<< type >> and C<< user >> parameter to new method. And type should be
secret, password or none.

=over 3

=item type is secret

You should pass secret_key parameter.

=item type is password

You should pass password parameter.

=item type is none

You dond need to pass other parameter.

lib/AnyEvent/WebService/ImKayac.pm  view on Meta::CPAN

    my %args = ($_[1]) ? @_ : %{$_[1]};

    croak "missing require parameter 'user'" unless defined $args{user};
    croak "missing require parameter 'type'" unless defined $args{type};

    $args{type} = 'none' if $args{type} !~ /^(none|password|secret)$/;

    if ($args{type} eq 'password' && ! defined $args{password}) {
        croak "require password";
    }

    if ($args{type} eq 'secret' && ! defined $args{secret_key}) {
        croak "require secret_key";
    }

lib/AnyEvent/WebService/ImKayac.pm  view on Meta::CPAN

sub _param_none {
    my ($self, %args) = @_;
    %args;
}

sub _param_password {
    my ($self, %args) = @_;

    (
        %args,
        password => $self->{password},
    );
}

sub _param_secret {
    my ($self, %args) = @_;

 view all matches for this distribution


AnyEvent-WebService-Tracks

 view release on metacpan or  search on metacpan

lib/AnyEvent/WebService/Tracks.pm  view on Meta::CPAN

    my ( $class, %params ) = @_;

    return bless {
        url      => URI->new($params{url}),
        username => $params{username},
        password => $params{password},
    }, $class;
}

sub parse_datetime {
    my ( $self, $str ) = @_;

lib/AnyEvent/WebService/Tracks.pm  view on Meta::CPAN

}

sub do_request {
    my ( $self, $http_method, $uri, $params, $method, $cb ) = @_;

    my ( $username, $password ) = @{$self}{qw/username password/};

    my $auth_token = encode_base64(join(':', $username, $password), '');
    $params->{'headers'} = {
        Authorization => "Basic $auth_token",
        Accept        => 'application/xml',
        Referer       => undef,
    };

lib/AnyEvent/WebService/Tracks.pm  view on Meta::CPAN

  use AnyEvent::WebService::Tracks;

  my $tracks = AnyEvent::WebService::Tracks->new(
    url      => 'http://my.tracks.instance/',
    username => 'user',
    password => 'pa55w0rd',
  );

  $tracks->projects(sub {
    my ( $projects ) = @_;

lib/AnyEvent/WebService/Tracks.pm  view on Meta::CPAN

=head1 METHODS

=head2 AnyEvent::WebService::Tracks->new(%params)

Creates a new AnyEvent::WebService::Tracks object.  C<%params> must contain
the url, username, and password parameters.

=head2 $tracks->projects($callback)

Retrieves the list of projects in the given Tracks installation and provides
them to the given callback.  If the call fails, then a falsy value and the

 view all matches for this distribution


AnyEvent-XMPP

 view release on metacpan or  search on metacpan

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

someone who sends the bot a 'send <filename>' message.

=item B<samples/simple_register_example>

This is a example script which allows you to register, unregister and change
your password for accounts. Execute it without arguments for more details.

=item B<samples/disco_info>

This is a small example tool that allows you to fetch the software version,
disco info and disco items information about a JID.

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

=item B<samples/retrieve_roster>

This is a simple example script that will retrieve the roster
for an account and print it to stdout. You start it like this:

   samples/# ./retrieve_roster <jid> <password>

=item B<samples/display_avatar>

This is just a small example which should display the avatar
of the account you connect to. It can be used like this:

   samples/# ./display_avatar <jid> <password>

=back

For others, which the author might forgot or didn't want to
list here see the C<samples/> directory.

 view all matches for this distribution


AnyMerchant

 view release on metacpan or  search on metacpan

lib/AnyMerchant.pm  view on Meta::CPAN


version 0.0002

=head1 SYNOPSIS

    my $gateway = AnyMerchant->gateway('Balanced', password => 'abc123');

=head1 DESCRIPTION

AnyMerchant is a generic and consistent interface for online payment services.
It is an alternative to L<Business::OnlinePayment>.

lib/AnyMerchant.pm  view on Meta::CPAN


=head1 METHODS

=head2 gateway

    my $gateway = AnyMerchant->gateway('Balanced', password => 'abc123');

This is a static factory method that creates an AnyMerchant::Gateway::* object,
validates its interface, and returns it.
In the above example, an AnyMerchant::Gateway::Balanced object is returned.

 view all matches for this distribution


AnyMongo

 view release on metacpan or  search on metacpan

lib/AnyMongo/Connection.pm  view on Meta::CPAN

    is       => 'rw',
    isa      => 'Str',
    required => 0,
);

has password => (
    is       => 'rw',
    isa      => 'Str',
    required => 0,
);

lib/AnyMongo/Connection.pm  view on Meta::CPAN

    eval "use ${_}" # no Any::Moose::load_class becase the namespaces already have symbols from the xs bootstrap
        for qw/AnyMongo::Database AnyMongo::Cursor AnyMongo::BSON::OID/;
    $self->_parse_servers();
    if ($self->auto_connect) {
        $self->connect;
        # if (defined $self->username && defined $self->password) {
        #     $self->authenticate($self->db_name, $self->username, $self->password);
        # }
    }

}

lib/AnyMongo/Connection.pm  view on Meta::CPAN

        name        => $database_name,
    );
}

sub authenticate {
    my ($self, $dbname, $username, $password, $is_digest) = @_;
    my $hash = $password;

    # create a hash if the password isn't yet encrypted
    if (!$is_digest) {
        $hash = Digest::MD5::md5_hex("${username}:mongo:${password}");
    }

    # get the nonce
    my $db = $self->get_database($dbname);
    my $result = $db->run_command({getnonce => 1});

 view all matches for this distribution


AnySan

 view release on metacpan or  search on metacpan

lib/AnySan/Provider/IRC.pm  view on Meta::CPAN


    # connect server
    $con->connect ($host, $port, {
        nick     => $nickname,
        user     => $config{user},
        password => $config{password},
    });

    return $self;
}

lib/AnySan/Provider/IRC.pm  view on Meta::CPAN


  my $irc = irc
      'chat.example.net', # irc servername *required
      port     => 6667, # default is 6667
      enable_ssl => 0, # 1 = use ssl socket, default is no use ssl
      password => 'server_password',
      key      => 'example1', # you can write, unique key *required
      nickname => 'AnySan1',  # irc nickname *required
      recive_commands => [ 'PRIVMSG', 'NOTICE' ], # default is [ 'PRIVMSG' ]
      interval        => 2, # default is 2(sec), defence of Excess Flood
      wait_queue_size => 100, # default is 100, for send message buffer size

 view all matches for this distribution


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