Commit 971eb4d6 authored by root's avatar root

major update

parent 3ad4d3dc
This diff is collapsed.
IPC::Shareable 1.13
Crypt::SSLeay 0.72
Crypt::OpenSSL::Guess
Crypt::OpenSSL::Random
Crypt::OpenSSL::Bignum
Crypt::OpenSSL::RSA
AnyEvent 7.17
Path::Class
ExtUtils::CBuilder
Imager::File::PNG 0.99|--configure-args="--libpath=/opt/thirdlane/perl_lib/local/usr/lib --incpath=/opt/thirdlane/perl_lib/local/usr/include"
AnyEvent 7.17|--notest|--force
Module::CoreList
Filter::Crypto::CryptFile 2.09
Crypt::OpenSSL::Guess
Net::SSLeay
CryptX 0.044
Crypt::Blowfish
......@@ -14,10 +19,7 @@ Crypt::Password 0.28|--notest|--force
Crypt::Primes 0.50
Crypt::RC4 2.02
Crypt::Random 1.25
Crypt::OpenSSL::RSA
Crypt::OpenSSL::Bignum
UUID 0.28
Crypt::SSLeay
Compress::Raw::Zlib 2.087|--notest|--force
DBD::mysql
Convert::ASN1 0.27
......@@ -45,7 +47,6 @@ Text::QRCode 0.05
HTML::QRCode 0.01
Imager::QRCode 0.035
Async::Interrupt 1.25
IPC::Shareable 0.61
B::Lint 1.20|--notest|--force
B::FindAmpersand 0.04|--notest|--force
Devel::SawAmpersand 0.33|--notest|--force
......@@ -108,7 +109,6 @@ CPAN::Meta::Requirements 2.140
CPAN::DistnameInfo 0.12
YAML::Tiny 1.70
File::Copy::Recursive 0.38
AnyEvent 7.04
AnyEvent::DBI 2.2
AnyEvent::HTTP 2.15
App::cpanminus 1.5021
......
#!/usr/bin/env perl
use Net::SSLeay qw(die_now die_if_ssl_error get_https post_https sslcat make_headers make_form);
Net::SSLeay::load_error_strings();
Net::SSLeay::SSLeay_add_ssl_algorithms(); # Important!
Net::SSLeay::ENGINE_load_builtin_engines(); # If you want built-in engines
Net::SSLeay::ENGINE_register_all_complete(); # If you want built-in engines
Net::SSLeay::randomize();
($page) = get_https('www.bacus.pt', 443, '/'); # Case 1
package IPC::Shareable::SharedMem;
use warnings;
use strict;
use constant DEBUGGING => ($ENV{SHM_DEBUG} or 0);
use Carp qw(carp croak confess);
use IPC::SysV qw(IPC_RMID);
my $Def_Size = 1024;
sub _trace {
require Carp;
require Data::Dumper;
my $caller = ' ' . (caller(1))[3] . " called with:\n";
my $i = -1;
my @msg = map {
++$i;
' ' . Data::Dumper->Dump( [ $_ ] => [ "\_[$i]" ]);
} @_;
Carp::carp "IPC::SharedMem debug:\n", $caller, @msg;
}
our $VERSION = '1.13';
sub _debug {
require Carp;
require Data::Dumper;
local $Data::Dumper::Terse = 1;
my $caller = ' ' . (caller(1))[3] . " tells us that:\n";
my @msg = map { ' ' . Data::Dumper::Dumper($_) } @_;
Carp::carp "IPC::SharedMem debug:\n", $caller, @msg;
};
use constant DEBUGGING => ($ENV{SHM_DEBUG} or 0);
my $default_size = 1024;
sub default_size {
_trace @_ if DEBUGGING;
my $class = shift;
$Def_Size = shift if @_;
return $Def_Size;
$default_size = shift if @_;
return $default_size;
}
sub new {
_trace @_ if DEBUGGING;
my($class, $key, $size, $flags) = @_;
my($class, $key, $size, $flags, $type) = @_;
defined $key or do {
require Carp;
Carp::croak "usage: IPC::SharedMem->new(KEY, [ SIZE, [ FLAGS ] ])";
confess "usage: IPC::SharedMem->new(KEY, [ SIZE, [ FLAGS ] ])";
};
$size ||= $Def_Size;
$size ||= $default_size;
$flags ||= 0;
_debug "calling shmget() on ", $key, $size, $flags if DEBUGGING;
my $id = shmget($key, $size, $flags);
defined $id or do {
require Carp;
Carp::carp "IPC::Shareable::SharedMem: shmget: $!\n";
if ($! =~ /File exists/){
croak "\nERROR: IPC::Shareable::SharedMem: shmget $key: $!\n\n" .
"Are you using exclusive, but trying to create multiple " .
"instances?\n\n";
}
return undef;
};
my $sh = {
_id => $id,
_key => $key,
_size => $size,
_flags => $flags,
_type => $type,
};
return bless $sh => $class;
}
sub id {
_trace @_ if DEBUGGING;
my $self = shift;
$self->{_id} = shift if @_;
return $self->{_id};
}
sub key {
my $self = shift;
$self->{_key} = shift if @_;
return $self->{_key};
}
sub flags {
_trace @_ if DEBUGGING;
my $self = shift;
$self->{_flags} = shift if @_;
return $self->{_flags};
}
sub size {
_trace @_ if DEBUGGING;
my $self = shift;
$self->{_size} = shift if @_;
return $self->{_size};
}
sub type {
my $self = shift;
$self->{_type} = shift if @_;
return $self->{_type};
}
sub shmwrite {
_trace @_ if DEBUGGING;
my($self, $data) = @_;
_debug "calling shmwrite() on ", $self->{_id}, $data,
0, $self->{_size} if DEBUGGING;
return shmwrite($self->{_id}, $data, 0, $self->{_size});
}
sub shmread {
_trace @_ if DEBUGGING;
my $self = shift;
my $data = '';
_debug "calling shread() on ", $self->{_id}, $data,
0, $self->{_size} if DEBUGGING;
shmread($self->{_id}, $data, 0, $self->{_size}) or return;
_debug "got ", $data, " from shm segment $self->{_id}" if DEBUGGING;
return $data;
}
sub remove {
_trace @_ if DEBUGGING;
my $self = shift;
my $op = shift;
my $to_remove = shift;
my $id;
if (ref $to_remove eq __PACKAGE__){
$id = $to_remove->{_id};
}
my $arg = 0;
return shmctl($self->{_id}, IPC_RMID, $arg);
my $ret = shmctl($id, IPC_RMID, $arg);
return $ret;
}
1;
......@@ -121,6 +111,11 @@ sub remove {
IPC::Shareable::SharedMem - Object oriented interface to shared memory
=for html
<a href="https://github.com/stevieb9/ipc-shareable/actions"><img src="https://github.com/stevieb9/ipc-shareable/workflows/CI/badge.svg"/></a>
<a href='https://coveralls.io/github/stevieb9/ipc-shareable?branch=master'><img src='https://coveralls.io/repos/stevieb9/ipc-shareable/badge.svg?branch=master&service=github' alt='Coverage Status' /></a>
=head1 SYNOPSIS
*** No public interface ***
......@@ -128,9 +123,7 @@ IPC::Shareable::SharedMem - Object oriented interface to shared memory
=head1 WARNING
This module is not intended for public consumption. It is used
internally by IPC::Shareable to access shared memory. It will
probably be replaced soon by IPC::ShareLite or IPC::SharedMem (when
someone writes it).
internally by IPC::Shareable to access shared memory.
=head1 DESCRIPTION
......@@ -144,4 +137,4 @@ Ben Sugars (bsugars@canoe.ca)
=head1 SEE ALSO
IPC::Shareable, IPC::SharedLite
L<IPC::Shareable>, L<IPC::ShareLite>
use warnings;
use strict;
use feature 'say';
use Script::Singleton warn => 1;
sleep 10;
This diff is collapsed.
package Mock::Sub::Child;
use 5.006;
use strict;
use warnings;
use Carp qw(confess);
use Scalar::Util qw(weaken);
our $VERSION = '1.09';
sub new {
my $self = bless {}, shift;
%{ $self } = @_;
if ($self->{side_effect}){
$self->_check_side_effect($self->{side_effect});
}
return $self;
}
sub _mock {
my $self = shift;
# throw away the sub name if it's sent in and we're not called
# by Mock::Sub::mock()
my $sub_passed_in;
if ($_[0] && $_[0] =~ /::/){
$sub_passed_in = 1;
}
my $caller = (caller(1))[3] || '';
if ($caller ne 'Mock::Sub::mock' && $sub_passed_in){
undef @_;
if(ref($self) eq 'Mock::Sub::Child' && ! $self->{name}){
confess "can't call mock() on a child object before it is already " .
"initialized with the parent mock object. ";
}
}
if ($caller ne 'Mock::Sub::mock' && $caller ne 'Mock::Sub::Child::remock'){
confess "the _mock() method is not a public API call. For re-mocking " .
"an existing sub in an existing sub object, use remock().\n";
}
my $sub = $self->name || shift;
my %p = @_;
for (keys %p){
$self->{$_} = $p{$_};
}
if ($sub !~ /::/) {
my $core_sub = "CORE::" . $sub;
if (defined &$core_sub && ${^GLOBAL_PHASE} eq 'START') {
warn "WARNING! we're attempting to override a global core " .
"function. You will NOT be able to restore functionality " .
"to this function.";
$sub = "CORE::GLOBAL::" . $sub;
}
else {
$sub = "main::$sub" if $sub !~ /::/;
}
}
my $fake;
if (! exists &$sub && $sub !~ /CORE::GLOBAL/) {
$fake = 1;
if (! $self->_no_warn) {
warn "\n\nWARNING!: we've mocked a non-existent subroutine. ".
"the specified sub does not exist.\n\n";
}
}
$self->_check_side_effect($self->{side_effect});
if (defined $self->{return_value}){
push @{ $self->{return} }, $self->{return_value};
}
$self->{name} = $sub;
$self->{orig} = \&$sub if ! $fake;
$self->{called_count} = 0;
{
no strict 'refs';
no warnings 'redefine';
my $mock = $self;
weaken $mock;
*$sub = sub {
@{ $mock->{called_with} } = @_;
++$mock->{called_count};
if ($mock->{side_effect}) {
if (wantarray){
my @effect = $mock->{side_effect}->(@_);
return @effect if @effect;
}
else {
my $effect = $mock->{side_effect}->(@_);
return $effect if defined $effect;
}
}
return if ! defined $mock->{return};
if ($mock->{return}[0] && $mock->{return}[0] eq 'params'){
return ! wantarray ? $_[0] : @_;
}
else {
return ! wantarray && @{ $mock->{return} } == 1
? $mock->{return}[0]
: @{ $mock->{return} };
}
};
}
$self->{state} = 1;
return $self;
}
sub remock {
shift->_mock(@_);
}
sub unmock {
my $self = shift;
my $sub = $self->{name};
{
no strict 'refs';
no warnings 'redefine';
if (defined $self->{orig} && $sub !~ /CORE::GLOBAL/) {
*$sub = \&{ $self->{orig} };
}
else {
undef *$sub if $self->{name};
}
}
$self->{state} = 0;
$self->reset;
}
sub called {
return shift->called_count ? 1 : 0;
}
sub called_count {
return shift->{called_count} || 0;
}
sub called_with {
my $self = shift;
if (! $self->called){
confess "\n\ncan't call called_with() before the mocked sub has " .
"been called. ";
}
return @{ $self->{called_with} };
}
sub name {
return shift->{name};
}
sub reset {
for (qw(side_effect return_value return called called_count called_with)){
delete $_[0]->{$_};
}
}
sub return_value {
my $self = shift;
@{ $self->{return} } = @_;
}
sub side_effect {
$_[0]->_check_side_effect($_[1]);
$_[0]->{side_effect} = $_[1];
}
sub _check_side_effect {
if (defined $_[1] && ref $_[1] ne 'CODE') {
confess "\n\nside_effect parameter must be a code reference. ";
}
}
sub mocked_state {
return shift->{state};
}
sub _no_warn {
return $_[0]->{no_warnings};
}
sub DESTROY {
$_[0]->unmock;
}
sub _end {}; # vim fold placeholder
__END__
=head1 NAME
Mock::Sub::Child - Provides for Mock::Sub
=head1 METHODS
Please refer to the C<Mock::Sub> parent module for full documentation. The
descriptions here are just a briefing.
=head2 new
This method can only be called by the parent C<Mock::Sub> module.
=head2 called
Returns bool whether the mocked sub has been called yet.
=head2 called_count
Returns an integer representing the number of times the mocked sub has been
called.
=head2 called_with
Returns a list of arguments the mocked sub was called with.
=head2 mock
This method should only be called by the parent mock object. You shouldn't be
calling this.
=head2 remock
Re-mocks an unmocked sub back to the same subroutine it was originally mocked
with.
=head2 mocked_state
Returns bool whether the sub the object represents is currently mocked or not.
=head2 name
Returns the name of the sub this object is mocking.
=head2 return_value
Send in any values (list or scalar) that you want the mocked sub to return when
called.
=head2 side_effect
Send in a code reference with any actions you want the mocked sub to perform
after it's been called.
=head2 reset
Resets all state of the object back to default (does not unmock the sub).
=head2 unmock
Restores original functionality of the mocked sub, and calls C<reset()> on the
object.
=cut
1;
......@@ -47,14 +47,29 @@ our @DNS_FALLBACK; # some public dns servers as fallback
my $ipv4 = $prep->(
["08080808", "08080404"], # 8.8.8.8, 8.8.4.4 - google public dns
# ["d1f40003", "d1f30004"], # v209.244.0.3/4 - resolver1/2.level3.net - status unknown
["04020201", "04020203", "04020204", "04020205", "04020206"], # v4.2.2.1/3/4/5/6 - vnsc-pri.sys.gtei.net - effectively public
["cdd22ad2", "4044c8c8"], # 205.210.42.205, 64.68.200.200 - cache1/2.dnsresolvers.com - verified public
# ["8d010101"], # 141.1.1.1 - cable&wireless - status unknown
["01010101", "01000001"], # 1.1.1.1, 1.0.0.1 - cloudflare public dns
["50505050", "50505151"], # 80.80.80.80, 80.80.81.81 - freenom.world
## ["d1f40003", "d1f30004"], # v209.244.0.3/4 - resolver1/2.level3.net - status unknown
## ["04020201", "04020203", "04020204", "04020205", "04020206"], # v4.2.2.1/3/4/5/6 - vnsc-pri.sys.gtei.net - effectively public
## ["cdd22ad2", "4044c8c8"], # 205.210.42.205, 64.68.200.200 - cache1/2.dnsresolvers.com - verified public
# ["8d010101"], # 141.1.1.1 - cable&wireless, now vodafone - status unknown
# 84.200.69.80 # dns.watch
# 84.200.70.40 # dns.watch
# 37.235.1.174 # freedns.zone
# 37.235.1.177 # freedns.zone
# 213.73.91.35 # dnscache.berlin.ccc.de
# 194.150.168.168 # dns.as250.net; Berlin/Frankfurt
# 85.214.20.141 # FoeBud (digitalcourage.de)
# 77.109.148.136 # privacyfoundation.ch
# 77.109.148.137 # privacyfoundation.ch
# 91.239.100.100 # anycast.censurfridns.dk
# 89.233.43.71 # ns1.censurfridns.dk
# 204.152.184.76 # f.6to4-servers.net, ISC, USA
);
my $ipv6 = $prep->(
["20014860486000000000000000008888", "20014860486000000000000000008844"], # 2001:4860:4860::8888/8844 - google ipv6
["26064700470000000000000000001111", "26064700470000000000000000001001"], # 2606:4700:4700::1111/1001 - cloudflare dns
);
undef $ipv4 unless $AnyEvent::PROTOCOL{ipv4};
......@@ -101,7 +116,7 @@ strings, you need to call the resolver manually:
Tries to resolve the given service, protocol and domain name into a list
of service records.
Each C<$srv_rr> is an array reference with the following contents:
Each C<$srv_rr> is an array reference with the following contents:
C<[$priority, $weight, $transport, $target]>.
They will be sorted with lowest priority first, then randomly
......@@ -114,8 +129,9 @@ Example:
=item AnyEvent::DNS::any $domain, $cb->(@rrs)
Tries to resolve the given domain and passes all resource records found to
the callback.
Tries to resolve the given domain and passes all resource records found
to the callback. Note that this uses a DNS C<ANY> query, which, as of RFC
8482, are officially deprecated.
=item AnyEvent::DNS::ptr $domain, $cb->(@hostnames)
......@@ -385,11 +401,25 @@ our %type_id = (
minfo => 14,
mx => 15,
txt => 16,
sig => 24,
key => 25,
gpos => 27, # rfc1712
aaaa => 28,
loc => 29, # rfc1876
srv => 33,
naptr => 35, # rfc2915
dname => 39, # rfc2672
opt => 41,
ds => 43, # rfc4034
sshfp => 44, # rfc4255
rrsig => 46, # rfc4034
nsec => 47, # rfc4034
dnskey=> 48, # rfc4034
smimea=> 53, # rfc8162
cds => 59, # rfc7344
cdnskey=> 60, # rfc7344
openpgpkey=> 61, # rfc7926
csync => 62, # rfc7929
spf => 99,
tkey => 249,
tsig => 250,
......@@ -397,6 +427,8 @@ our %type_id = (
axfr => 252,
mailb => 253,
"*" => 255,
uri => 256,
caa => 257, # rfc6844
);
our %type_str = reverse %type_id;
......@@ -557,6 +589,7 @@ our %dec_rr = (
},
39 => sub { local $ofs = $ofs - length; _dec_name }, # dname
99 => sub { unpack "(C/a*)*", $_ }, # spf
257 => sub { unpack "CC/a*a*", $_ }, # caa
);
sub _dec_rr {
......@@ -605,7 +638,8 @@ Examples:
'aa' => '',
'an' => [],
'rd' => 1,
'op' => 'query'
'op' => 'query',
'__' => '<original dns packet>',
}
# a successful reply
......@@ -634,7 +668,8 @@ Examples:
[ 'www.l.google.com', 'a', 'in', 3600, '66.249.93.147' ],
],
'rd' => 1,
'op' => 0
'op' => 0,
'__' => '<original dns packet>',
}
=cut
......@@ -647,6 +682,7 @@ sub dns_unpack($) {
local $ofs = 6 * 2;
{
__ => $pkt,
id => $id,
qr => ! ! ($flags & 0x8000),
aa => ! ! ($flags & 0x0400),
......@@ -669,6 +705,70 @@ sub dns_unpack($) {
=back
=head3 Extending DNS Encoder and Decoder
This section describes an I<experimental> method to extend the DNS encoder
and decoder with new opcode, rcode, class and type strings, as well as
resource record decoders.
Since this is experimental, it can change, as anything can change, but
this interface is expe ctedc to be relatively stable and was stable during
the whole existance of C<AnyEvent::DNS> so far.
Note that, since changing the decoder or encoder might break existing
code, you should either be sure to control for this, or only temporarily
change these values, e.g. like so:
my $decoded = do {
local $AnyEvent::DNS::opcode_str{7} = "yxrrset";
AnyEvent::DNS::dns_unpack $mypkt
};
=over 4
=item %AnyEvent::DNS::opcode_id, %AnyEvent::DNS::opcode_str
Two hashes that map lowercase opcode strings to numerical id's (For the
encoder), or vice versa (for the decoder). Example: add a new opcode
string C<notzone>.
$AnyEvent::DNS::opcode_id{notzone} = 10;
$AnyEvent::DNS::opcode_str{10} = 'notzone';
=item %AnyEvent::DNS::rcode_id, %AnyEvent::DNS::rcode_str
Same as above, for for rcode values.
=item %AnyEvent::DNS::class_id, %AnyEvent::DNS::class_str
Same as above, but for resource record class names/values.
=item %AnyEvent::DNS::type_id, %AnyEvent::DNS::type_str
Same as above, but for resource record type names/values.
=item %AnyEvent::DNS::dec_rr
This hash maps resource record type values to code references. When
decoding, they are called with C<$_> set to the undecoded data portion and
C<$ofs> being the current byte offset. of the record. You should have a
look at the existing implementations to understand how it works in detail,
but here are two examples:
Decode an A record. A records are simply four bytes with one byte per
address component, so the decoder simply unpacks them and joins them with
dots in between:
$AnyEvent::DNS::dec_rr{1} = sub { join ".", unpack "C4", $_ };
Decode a CNAME record, which contains a potentially compressed domain
name.
package AnyEvent::DNS; # for %dec_rr, $ofsd and &_dec_name
$dec_rr{5} = sub { local $ofs = $ofs - length; _dec_name };
=back
=head2 THE AnyEvent::DNS RESOLVER CLASS
This is the class which does the actual protocol work.
......@@ -698,7 +798,7 @@ resolver object.
The resolver is created with the following parameters:
untaint enabled
max_outstanding $ENV{PERL_ANYEVENT_MAX_OUTSTANDING_DNS}
max_outstanding $ENV{PERL_ANYEVENT_MAX_OUTSTANDING_DNS} (default 10)
C<os_config> will be used for OS-specific configuration, unless
C<$ENV{PERL_ANYEVENT_RESOLV_CONF}> is specified, in which case that file
......@@ -722,7 +822,7 @@ sub resolver() {
$RESOLVER || do {
$RESOLVER = new AnyEvent::DNS
untaint => 1,
max_outstanding => $ENV{PERL_ANYEVENT_MAX_OUTSTANDING_DNS}*1 || 1,
max_outstanding => $ENV{PERL_ANYEVENT_MAX_OUTSTANDING_DNS}*1 || 10,
;
$ENV{PERL_ANYEVENT_RESOLV_CONF}
......@@ -812,7 +912,7 @@ sub new {
if (socket my $fh4, AF_INET , Socket::SOCK_DGRAM(), 0) {
++$got_socket;
AnyEvent::Util::fh_nonblocking $fh4, 1;
AnyEvent::fh_unblock $fh4;
$self->{fh4} = $fh4;
$self->{rw4} = AE::io $fh4, 0, sub {
if (my $peer = recv $fh4, my $pkt, MAX_PKT, 0) {
......@@ -825,7 +925,7 @@ sub new {
++$got_socket;
$self->{fh6} = $fh6;
AnyEvent::Util::fh_nonblocking $fh6, 1;
AnyEvent::fh_unblock $fh6;
$self->{rw6} = AE::io $fh6, 0, sub {
if (my $peer = recv $fh6, my $pkt, MAX_PKT, 0) {
$wself->_recv ($pkt, $peer);
......@@ -1106,7 +1206,7 @@ sub _recv {
my ($port, $host) = AnyEvent::Socket::unpack_sockaddr ($peer);
return unless $port == 53 && grep $_ eq $host, @{ $self->{server} };
return unless $port == DOMAIN_PORT && grep $_ eq $host, @{ $self->{server} };
$self->_feed ($pkt);
}
......
......@@ -46,7 +46,7 @@ our %STRCACHE;
This function binds on the given host and service port and returns a
shell object, which determines the lifetime of the shell. Any number
of conenctions are accepted on the port, and they will give you a very
of connections are accepted on the port, and they will give you a very
primitive shell that simply executes every line you enter.
All commands will be executed "blockingly" with the socket C<select>ed for
......@@ -122,16 +122,37 @@ sub shell($$) {
$logger_guard if 0; # reference it
if (defined $len ? $len == 0 : $! != Errno::EAGAIN) {
if (defined $len ? $len == 0 : ($! != Errno::EAGAIN && $! != Errno::EWOULDBLOCK)) {
undef $rw;
} else {
while ($rbuf =~ s/^(.*)\015?\012//) {
my $line = $1;
AnyEvent::Util::fh_nonblocking $fh, 0;
AnyEvent::fh_block $fh;
if ($line =~ /^\s*exit\b/) {
syswrite $fh, "sorry, no... if you want to execute exit, try CORE::exit.\015\012";
} elsif ($line =~ /^\s*coro\b\s*(.*)/) {
my $arg = $1;
if (eval { require Coro; require Coro::Debug }) {
if ($arg =~ /\S/) {
Coro::async (sub {
select $fh;
Coro::Debug::command ($arg);
local $| = 1; # older Coro versions do not flush
syswrite $fh, "> ";
});
return;
} else {
undef $rw;
syswrite $fh, "switching to Coro::Debug...\015\012";
Coro::async (sub { Coro::Debug::session ($fh) });
return;
}
} else {
syswrite $fh, "Coro not available.\015\012";
}
} else {
package AnyEvent::Debug::shell;
......@@ -154,7 +175,7 @@ sub shell($$) {
}
syswrite $fh, "> ";
AnyEvent::Util::fh_nonblocking $fh, 1;
AnyEvent::fh_unblock $fh;
}
}
};
......@@ -178,6 +199,8 @@ ut disable tracing for newly created watchers
t id,... enable tracing for the given watcher (enabled by default)
ut id,... disable tracing for the given watcher
w id,... converts the watcher ids to watcher objects (for scripting)
coro xxx run xxx as Coro::Debug shell command, if available
coro switch to Coro::Debug shell, if available
EOF
}
......@@ -623,7 +646,7 @@ sub verbose {
my $res = "type: $self->{type} watcher\n"
. "args: " . (join " ", %{ $self->{arg} }) . "\n" # TODO: decode fh?
. "created: " . (AnyEvent::Log::ft $self->{now}) . " ($self->{now})\n"
. "created: " . (AnyEvent::Log::format_time $self->{now}) . " ($self->{now})\n"
. "file: ${ $self->{rfile} }\n"
. "line: $self->{line}\n"
. "subname: $self->{sub}\n"
......@@ -639,7 +662,7 @@ sub verbose {
if (exists $self->{error}) {
$res .= "errors: " . @{$self->{error}} . "\n";
$res .= "error: " . (AnyEvent::Log::ft $_->[0]) . " ($_->[0]) $_->[1]\n"
$res .= "error: " . (AnyEvent::Log::format_time $_->[0]) . " ($_->[0]) $_->[1]\n"
for @{$self->{error}};
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment