Thanks for your reply and especially for mentioning the bug report.

How exactly?
As you can see in my example (and in the bugreport):
The "search" block contains only the local domain part by default, but it can be changed to whatever suits your needs. Therefor the module relies on information which might be right but don't have to be.

Sys::Hostname is not an option for me, as I need to know the FQDN and not only the host-part of the hostname. It calls "uname -n" [0], which does not have to know the domain-part.

Here's another example:
mobile:~# head -n2 /etc/resolv.conf domain example.org search intern.example.org example.org mobile:~# python -c 'import socket; print socket.getfqdn();' mobile.example.org mobile:~# hostname -f mobile.example.org mobile:~# perl -e 'use Net::Domain qw/ hostfqdn /; print(hostfqdn . "\ +n");' mobile.intern.example.org mobile:~# perl -e 'use Sys::Hostname; print(hostname . "\n");' mobile

Anyways, the bug report completely describes my issue, so maybe things will get fixed soon.

[0]: http://www.kernel.org/doc/man-pages/online/pages/man2/uname.2.html

In reply to Re^2: Getting the FQDN using Net::Domain by nickolsen
in thread Getting the FQDN using Net::Domain by nickolsen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.