view release on metacpan or search on metacpan
lib/AnyEvent/Feed.pm view on Meta::CPAN
hash reference, just like you would pass it to the C<headers> argument of
the C<http_get> request of L<AnyEvent::HTTP>.
=item username => $http_user
=item password => $http_pass
These are the HTTP username and password that will be used for Basic HTTP
Authentication with the HTTP server when fetching the feed. This is mostly
sugar for you so you don't have to encode them yourself and pass them to the
C<headers> argument above.
=item on_fetch => $cb->($feed_reader, $new_entries, $feed_obj, $error)
lib/AnyEvent/Feed.pm view on Meta::CPAN
if (defined $self->{last_mod}) {
$hdrs{'If-Modified-Since'} = $self->{last_mod};
}
$hdrs{Authorization} =
"Basic " . encode_base64 (join ':', $self->{username}, $self->{password}, '')
if defined $self->{username};
\%hdrs
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/FreeSWITCH.pm view on Meta::CPAN
my $class = ref($this) || $this;
my $self = bless(\%args, $class);
$self->{host} ||= '127.0.0.1';
$self->{port} ||= '8021';
$self->{password} ||= 'ClueCon';
$self->{events} ||= 'all';
return $self;
}
lib/AnyEvent/FreeSWITCH.pm view on Meta::CPAN
my $self = shift;
$self->{esl} = new ESL::ESLconnection(
$self->{host},
$self->{port},
$self->{password},
);
if ( $self->is_connected() ) {
$self->event('connected');
$self->{io} = AnyEvent->io(
fh => $self->{esl}->socketDescriptor(),
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Gmail/Feed.pm view on Meta::CPAN
sub new {
my ($class, %args) = @_;
my $username = delete $args{username};
my $password = delete $args{password};
my $label = delete $args{label};
my $interval = delete $args{interval} || 60;
unless ($username && $password) {
die "both username and password are required";
}
my $self = bless {}, $class;
my $auth = MIME::Base64::encode( join(":", $username, $password) );
my $headers = {Authorization => "Basic $auth"};
my $uri = 'https://mail.google.com/mail/feed/atom/';
$uri .= $label . '/' if $label; ## 'unread' or whatever
my %seen;
lib/AnyEvent/Gmail/Feed.pm view on Meta::CPAN
use AnyEvent;
use AnyEvent::Gmail::Feed;
AnyEvent::Gmail::Feed->new(
username => $user, #required
password => $pass, #required
label => $label, #optional (eg. 'unread')
interval => $interval, #optional (60s by default)
on_new_entry => sub {
my $entry = shift; #XML::Atom::Entry instance
use Data::Dumper; warn Dumper $entry->as_xml;
view all matches for this distribution
view release on metacpan or search on metacpan
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
view release on metacpan or search on metacpan
lib/AnyEvent/HTTP/Socks.pm view on Meta::CPAN
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
^^^^^^ ^^^^^^^^^^^^^^ ^^^^ ^^^^
1 2 3 4
1 - scheme can be one of the: socks4, socks4a, socks5
2 - "login:password@" part can be ommited if no authorization for socks proxy needed. For socks4
proxy "password" should be ommited, because this proxy type doesn't support login/password authentication,
login will be interpreted as userid.
3 - ip or hostname of the proxy server
4 - port of the proxy server
view all matches for this distribution
view release on metacpan or search on metacpan
TODO: provide lwp_request function that takes an lwp http requets and returns a http response.
TODO: set_proxy hook
TODO: use proxy hook
TODO: on_upgrade, for 101 responses?
TODO: document session vs. sessionid correctly.
TODO: support proxy username:password in both proxy switch and set_proxy string (dzagashev@gmail.com)
TODO: remove "unexpectedly got a destructed handle"
TODO: maybe read big chunks in smaller portions for chunked-encoding + on_body.
TODO: callback as body (Kostirya)
TODO: infinite recursion(?) (Kostirya)
view all matches for this distribution
view release on metacpan or search on metacpan
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
view release on metacpan or search on metacpan
t/lib/RPC/ExtDirect/Test/Util/AnyEvent.pm view on Meta::CPAN
my $output = $test->{output};
next TEST if @run_only && !grep { lc $name eq lc $_ } @run_only;
local $RPC::ExtDirect::Test::Pkg::PollProvider::WHAT_YOURE_HAVING
= $config->{password};
my $url = $input->{anyevent_url} || $input->{url};
my $method = $input->{method};
my $input_content = $input->{anyevent_content} || $input->{content}
|| { type => 'raw_get', arg => [$url] };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/IMAP.pm view on Meta::CPAN
use AnyEvent::IMAP;
my $imap = AnyEvent::IMAP->new(
host => 'server',
user => "USERID",
pass => 'password',
port => 993,
ssl => 1,
);
$imap->reg_cb(
connect => sub {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/twitter.pl view on Meta::CPAN
use Config::Pit;
use opts;
my $conf = pit_get('twitter.com', require => {
"username" => "your username on twitter",
"password" => "your password on twitter",
});
opts my $port => 'Int';
my $ircd = AnyEvent::IRC::Server->new(
examples/twitter.pl view on Meta::CPAN
);
$ircd->run();
my $streamer = AnyEvent::Twitter::Stream->new(
username => $conf->{username},
password => $conf->{password},
method => 'filter',
track => 'http',
on_tweet => sub {
my $tweet = shift;
$ircd->daemon_cmd_privmsg(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/IRC/Client.pm view on Meta::CPAN
The keys of the hash reference you can pass in C<$info> are:
nick - the nickname you want to register as
user - your username
real - your realname
password - the server password
timeout - the TCP connect timeout
All keys, except C<nick> are optional.
=cut
lib/AnyEvent/IRC/Client.pm view on Meta::CPAN
ext_before_connect => sub {
my ($self, $err) = @_;
unless ($err) {
$self->register (
$info->{nick}, $info->{user}, $info->{real}, $info->{password}
);
}
delete $self->{register_cb_guard};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
use JSON qw(decode_json);
use List::MoreUtils qw(zip);
use URI::Encode::XS qw( uri_encode );
use Moo;
has [qw( ssl_options username password jwt on_request )] => (
is => 'ro',
predicate => 1,
);
has 'server' => (
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
sub _build__server_uri {
my ($self) = @_;
my $url = URI->new( $self->server, 'http' );
if ( $self->has_username && $self->has_password ) {
$url->query_param( 'u' => $self->username );
$url->query_param( 'p' => $self->password );
}
return $url;
}
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
my $q;
if ( exists $args{q} ) {
$q = $args{q};
} else {
$q = 'CREATE USER '. $args{username}
.' WITH PASSWORD \''. $args{password} .'\'';
$q .= ' WITH ALL PRIVILEGES' if $args{all_privileges};
}
my $url = $self->_make_url('/query', {
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
}
);
}
sub set_user_password {
my ($self, %args) = @_;
my $q;
if ( exists $args{q} ) {
$q = $args{q};
} else {
$q = 'SET PASSWORD FOR '. $args{username}
.' = \''. $args{password} .'\'';
}
my $url = $self->_make_url('/query', {
q => $q
});
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
use Monitoring::Plugin::Performance;
my $db = AnyEvent::InfluxDB->new(
server => 'http://localhost:8086',
username => 'admin',
password => 'password',
);
my $hdl;
tcp_server undef, 8888, sub {
my ($fh, $host, $port) = @_;
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
my $db = AnyEvent::InfluxDB->new(
server => 'http://localhost:8086',
# authenticate using Basic credentials
username => 'admin',
password => 'password',
# or use JWT token
jwt => 'JWT_TOKEN_BLOB'
);
Returns object representing given InfluDB C<server> connected using optionally
provided username C<username> and password C<password>.
Default value of C<server> is C<http://localhost:8086>.
If the server protocol is C<https> then by default no validation of remote
host certificate is performed. This can be changed by setting C<ssl_options>
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
print "$method $url\n";
print "$post_data\n" if $post_data;
}
);
=for Pod::Coverage has_jwt jwt has_on_request has_password has_ssl_options has_username on_request password server ssl_options username
=head2 ping
$cv = AE::cv;
$db->ping(
lib/AnyEvent/InfluxDB.pm view on Meta::CPAN
=head3 create_user
$cv = AE::cv;
$db->create_user(
# raw query
q => "CREATE USER jdoe WITH PASSWORD 'mypassword' WITH ALL PRIVILEGES",
# or query created from arguments
username => 'jdoe',
password => 'mypassword',
all_privileges => 1,
# callbacks
on_success => $cv,
on_error => sub {
$cv->croak("Failed to create user: @_");
}
);
$cv->recv;
Creates user with C<username> and C<password>. If flag C<all_privileges> is set
to true created user will be granted cluster administration privileges.
Note: C<password> will be automatically enclosed in single quotes.
The required C<on_success> code reference is executed if request was successful,
otherwise executes the required C<on_error> code reference.
=head3 set_user_password
$cv = AE::cv;
$db->set_user_password(
# raw query
q => "SET PASSWORD FOR jdoe = 'otherpassword'",
# or query created from arguments
username => 'jdoe',
password => 'otherpassword',
# callbacks
on_success => $cv,
on_error => sub {
$cv->croak("Failed to set password: @_");
}
);
$cv->recv;
Sets password to C<password> for the user identified by C<username>.
Note: C<password> will be automatically enclosed in single quotes.
The required C<on_success> code reference is executed if request was successful,
otherwise executes the required C<on_error> code reference.
=head3 show_users
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/JSONRPC/HTTP/Client.pm view on Meta::CPAN
is => "rw",
isa => 'Str',
predicate => "has_username"
);
has password => (
is => "rw",
isa => "Str"
);
has _request_pool => (
lib/AnyEvent/JSONRPC/HTTP/Client.pm view on Meta::CPAN
sub _authorization_header {
my $self = shift;
return unless $self->has_username;
return Authorization => "Basic " . encode_base64( $self->username . ":" . $self->password );
}
sub _handle_response {
my ($self, $json, $header) = @_;
lib/AnyEvent/JSONRPC/HTTP/Client.pm view on Meta::CPAN
use AnyEvent::JSONRPC::HTTP::Client;
my $client = AnyEvent::JSONRPC::HTTP::Client->new(
url => 'http://rpc.example.net/issues',
username => "pmakholm",
password => "secret",
);
# blocking interface
my $res = $client->call( echo => 'foo bar' )->recv; # => 'foo bar';
lib/AnyEvent/JSONRPC/HTTP/Client.pm view on Meta::CPAN
Username to use for authorization (Optional).
If this is set an Authorization header containing basic auth credential is
always sent with request.
=item password => 'Str'
Password used for authorization (optional)
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/KVStore/Etcd.pm view on Meta::CPAN
=cut
has user => (is => 'ro', isa => Str);
=head2 password Str
Password for authentication.
=cut
has password => (is => 'ro', isa => Str);
=head2 cnx Net::Etcd
This is the active connection to the etcd database.
lib/AnyEvent/KVStore/Etcd.pm view on Meta::CPAN
sub _etcd_connect {
my $self = shift;
my $cnx = Net::Etcd->new($self->_slice('host', 'port', 'ssl'));
die 'Could not create new etcd connection' unless $cnx;
$cnx->auth($self->_slice('user', 'password'))->authenticate if $self->user;
return $cnx;
}
has cnx => (is => 'ro', builder => '_etcd_connect', lazy => 1);
view all matches for this distribution
view release on metacpan or search on metacpan
eg/lingr-stream.pl view on Meta::CPAN
use Config::Pit;
my $conf = pit_get 'lingr.com', require => {
'user' => 'lingr username',
'password' => 'lingr password',
'api_key' => 'lingr api_key (optional)',
};
my $cv = AE::cv;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/MCP/Client/HTTP.pm view on Meta::CPAN
);
}
defined $kv{url}
or die "HTTP client requires a URL\n";
!exists $kv{username} && !exists $kv{password}
or die "HTTP Basic authentication is unsupported\n";
die "Invalid bearer token\n" if defined $kv{bearer} && $kv{bearer} !~ /\A[^\s]+\z/;
$class->SUPER::new (timeout => 300, %kv)
}
view all matches for this distribution
view release on metacpan or search on metacpan
MP/Transport.pm view on Meta::CPAN
=item the acceptable authentication methods
A comma-separated list of authentication methods supported by the
node. Note that AnyEvent::MP supports a C<hex_secret> authentication
method that accepts a clear-text password (hex-encoded), but will not use
this authentication method itself.
The receiving side should choose the first authentication method it
supports.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/MQTT.pm view on Meta::CPAN
wait => 'nothing',
keep_alive_timer => 120,
qos => MQTT_QOS_AT_MOST_ONCE,
message_id => 1,
user_name => undef,
password => undef,
tls => undef,
will_topic => undef,
will_qos => MQTT_QOS_AT_MOST_ONCE,
will_retain => 0,
will_message => '',
lib/AnyEvent/MQTT.pm view on Meta::CPAN
will_topic => $weak_self->{will_topic},
will_qos => $weak_self->{will_qos},
will_retain => $weak_self->{will_retain},
will_message => $weak_self->{will_message},
user_name => $weak_self->{user_name},
password => $weak_self->{password},
);
$weak_self->_write_now($msg);
$handle->timeout($weak_self->{timeout});
$weak_self->{wait} = 'connack';
$handle->on_read(subname 'on_read_cb' => sub {
lib/AnyEvent/MQTT.pm view on Meta::CPAN
=item C<user_name>
The user name for the MQTT broker.
=item C<password>
The password for the MQTT broker.
=item C<tls>
Set flag to enable TLS encryption, Default is no encryption.
view all matches for this distribution
view release on metacpan or search on metacpan
examples/client.pl view on Meta::CPAN
$|++;
$AnyEvent::MSN::DEBUG++;
my ($user, $pass) = @ARGV; # XXX - Better to use a GetOpt-like module
my $cv = AnyEvent->condvar;
($user, $pass) = ('anyevent_msn@hotmail.com', 'public');
($user, $pass) = ('msn@penilecolada.com', 'password');
my $reconnect_timer;
#
my $msn = AnyEvent::MSN->new(
passport => $user, # XXX - I may change the name of this arg before pause
password => $pass,
# Extra user info
status => 'AWY',
friendlyname => 'Just another MSN hacker,',
personalmessage => 'This can\'t be life!',
view all matches for this distribution
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
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
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
view release on metacpan or search on metacpan
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
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
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
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
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
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
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
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
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
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
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
view release on metacpan or search on metacpan
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
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