Skip Menu |

This queue is for tickets about the Any-Daemon-HTTP CPAN distribution.

Report information
The Basics
Id: 91672
Status: resolved
Priority: 0/
Queue: Any-Daemon-HTTP

People
Owner: Nobody in particular
Requestors: cpan [...] neonics.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.23
Fixed in: (no value)



Subject: panic: Can't call method "fromDisk" on an undefined value at /usr/lib/perl5/site_perl/5.14/Any/Daemon/HTTP/VirtualHost.pm line 163.
Running: perl -MAny::Daemon::HTTP -e 'Any::Daemon::HTTP->new(host=>"localhost:3331")->run(background=>0)' and connecting to http://localhost:3331 results in the browser attemping to load 'www.localhost.com:3331' (due to no response on the socket), and the following console output: panic: Can't call method "fromDisk" on an undefined value at /usr/lib/perl5/site_perl/5.14/Any/Daemon/HTTP/VirtualHost.pm line 163. at /usr/lib/perl5/site_perl/5.14/Any/Daemon.pm line 130 Log::Report::panic("Can't call method \"fromDisk\" on an undefined value at /usr/lib/perl5/site_perl/5.14/Any/Daemon/HTTP/VirtualHost.pm line 163.") at /usr/lib/perl5/site_perl/5.14/Any/Daemon.pm line 130 Any::Daemon::__ANON__() at /usr/lib/perl5/site_perl/5.14/Any/Daemon.pm line 232 Any::Daemon::_child_died(10, "CODE(0x806a8e80)") at /usr/lib/perl5/site_perl/5.14/Any/Daemon.pm line 167 Any::Daemon::run("Any::Daemon::HTTP=HASH(0x8002bf20)", "new_connection", "CODE(0x806a2f18)", "background", 0, "child_task", "CODE(0x806a8a48)") at /usr/lib/perl5/site_perl/5.14/Any/Daemon/HTTP.pm line 228 Any::Daemon::HTTP::run("Any::Daemon::HTTP=HASH(0x8002bf20)", "background", 0) at -e line 1 This typically occurs when custom handlers are installed, in which case there are no directories configured. Patch: --- lib/Any/Daemon/HTTP/VirtualHost.pm (original) +++ lib/Any/Daemon/HTTP/VirtualHost.pm (patched) @@ -160,7 +160,7 @@ my $tree = $self->directoryOf(@path); # static content? - my $resp = $tree and $tree->fromDisk($session, $req, $uri); + my $resp = $tree->fromDisk($session, $req, $uri); return $resp if $resp; # dynamic content
Subject: Re: [rt.cpan.org #91672] panic: Can't call method "fromDisk" on an undefined value at /usr/lib/perl5/site_perl/5.14/Any/Daemon/HTTP/VirtualHost.pm line 163.
Date: Thu, 26 Dec 2013 16:59:44 +0100
To: "https://openid.stackexchange.com/user/83939ede-74ea-4f6c-8bf4-a4539b9b5220 via RT" <bug-Any-Daemon-HTTP [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* https://openid.stackexchange.com/user/83939ede-74ea-4f6c-8bf4-a4539b9b5220 via RT (bug-Any-Daemon-HTTP@rt.cpan.org) [131226 14:08]: Show quoted text
> Thu Dec 26 09:08:23 2013: Request 91672 was acted upon. > Transaction: Ticket created by https://openid.stackexchange.com/user/83939ede-74ea-4f6c-8bf4-a4539b9b5220 > Queue: Any-Daemon-HTTP > Subject: panic: Can't call method "fromDisk" on an undefined value at > /usr/lib/perl5/site_perl/5.14/Any/Daemon/HTTP/VirtualHost.pm line 163. > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=91672 > > > perl -MAny::Daemon::HTTP -e 'Any::Daemon::HTTP->new(host=>"localhost:3331") > ->run(background=>0)' > > This typically occurs when custom handlers are installed, in which > case there are no directories configured.
I think the patch is reversed Show quoted text
> - my $resp = $tree and $tree->fromDisk($session, $req, $uri); > + my $resp = $tree->fromDisk($session, $req, $uri);
>>>> my $resp = $tree ? $tree->fromDisk($session, $req, $uri) : undef;
Both Log::Report and Any::Daemon::HTTP (and a few more of my modules) will see huge updates in the coming week. -- Thanks for the report! MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
fixed 0.24