Skip Menu |
 

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 69238
Status: new
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: shay [...] cpan.org
Cc:
AdminCc:

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



Subject: Net::Domain::hostname() returns 'localhost' under mod_perl
Download (untitled) / with headers
text/plain 687b
Net::Domain::hostname() correctly returns my computer's hostname (HPXP) in a simple command-line program, but returns 'localhost' when used in a mod_perl handler. Net::Domain::hostfqdn() also has the same problem, but Sys::Hostname::hostname() works fine. The attached handler module outputs: Net::Domain::hostname() = localhost Net::Domain::hostfqdn() = localhost Sys::Hostname::hostname() = HPXP It is configured as: <Location /hostnametest> SetHandler modperl PerlResponseHandler HostnameTest </Location> This is using perl-5.12.2 with its original libnet (1.22), mod_perl-2.0.5 and Apache httpd-2.2.17, built with MS Visual Studio 2010 SP1 and running on Windows XP SP3.
Subject: HostnameTest.pm
Download HostnameTest.pm
text/x-perl 466b
package HostnameTest; use 5.012002; use strict; use warnings; use Apache2::Const qw(OK); use Net::Domain qw(); use Sys::Hostname qw(); sub handler : method { my($class, $r) = @_; $r->print("Net::Domain::hostname() = ", Net::Domain::hostname(), "\n"); $r->print("Net::Domain::hostfqdn() = ", Net::Domain::hostfqdn(), "\n"); $r->print("Sys::Hostname::hostname() = ", Sys::Hostname::hostname(), "\n"); return Apache2::Const::OK; } 1;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.