in reply to Re^2: DBD message diagnostic?
in thread DBD message diagnostic?

Looking at the source, it looks as though there technically is no default hostname. Check out the _connect sub, and you'll see that it checks whether hostname is defined to decide whether to try a TCP socket. But looking a few lines up at new, there isn't any default for hostname, it has to be passed as an argument to new():
sub new { my ($class, %args) = @_; my $self = bless { hostname => $args{hostname}, path => $args{path} || DEFAULT_UNIX_SOCKE +T, port => $args{port} || DEFAULT_PORT_NUMBE +R, #...snip!

Replies are listed 'Best First'.
Re^4: DBD message diagnostic?
by BrowserUk (Patriarch) on Apr 15, 2009 at 13:54 UTC

    Yeah, The POD is out of step with the code (and the default behaviour is different from DBD::Pg).

    parameter | hard coded default ----------+------------------- dbname | current userid host | localhost port | 5432 path | /tmp debug | undef

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.