Subject: | AnyEvent::Debug calling AnyEvent::Log::ft() |
It looks like AnyEvent::Log::ft was renamed AnyEvent::Log:format_time. AnyEvent::Debug::verbose() still uses the old call. The run time result is:
Show quoted text
>wl
85152900 AnyEvent::HTTPD::HTTPServer:61(new)>io>AnyEvent::Socket:489
Show quoted text> i 85152900
main::__ANON__('Can\'t locate object method "ft" via package "AnyEvent::Log" ...') called at C:\Users\MSTOVE~1\perl5\lib\perl5\MSWin32-x86-multi-thread/AnyEvent/Debug.pm line 654
AnyEvent::Debug::Wrapped::verbose('AnyEvent::Debug::Wrapped=HASH(0x5135484)') called at C:\Users\MSTOVE~1\perl5\lib\perl5\MSWin32-x86-multi-thread/AnyEvent/Debug.pm line 231
AnyEvent::Debug::shell::i(85152900) called at (eval 532) line 1
eval 'i 85152900
;' called at C:\Users\MSTOVE~1\perl5\lib\perl5\MSWin32-x86-multi-thread/AnyEvent/Debug.pm line 164
AnyEvent::Debug::__ANON__() called at C:\Users\MSTOVE~1\perl5\lib\perl5\MSWin32-x86-multi-thread/AnyEvent/Loop.pm line 248
AnyEvent::Loop::one_event() called at C:\Users\MSTOVE~1\perl5\lib\perl5\MSWin32-x86-multi-thread/AnyEvent/Impl/Perl.pm line 46
AnyEvent::CondVar::Base::_wait('AnyEvent::CondVar=HASH(0x46fff94)') called at C:\Users\MSTOVE~1\perl5\lib\perl5\MSWin32-x86-multi-thread/AnyEvent.pm line 1994
The following patch corrects the issue:
$ diff -u AnyEvent/Debug.orig AnyEvent/Debug.pm
--- AnyEvent/Debug.orig 2014-12-23 15:22:10.656435400 -0600
+++ AnyEvent/Debug.pm 2014-12-23 15:30:47.756011800 -0600
@@ -646,7 +646,7 @@
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"
@@ -662,7 +662,7 @@
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}};
}
New run time result:
Show quoted text>wl
81876044 AnyEvent::HTTPD::HTTPServer:61(new)>io>AnyEvent::Socket:489
Show quoted text> i 81876044
81876044 AnyEvent::HTTPD::HTTPServer:61(new)>io>AnyEvent::Socket:489
type: io watcher
args: poll r fh GLOB(0x4e150cc)
created: 2014-12-23 15:18:02.021254 Central Standard Time (1419369482.02125)
file: C:\Users\MSTOVE~1\perl5\lib\perl5/AnyEvent/HTTPD/HTTPServer.pm
line: 61
subname: AnyEvent::HTTPD::HTTPServer::new
context:
tracing: enabled
cb: CODE(0x4c6313c) (AnyEvent::Socket:489)
invoked: 0 times