in reply to quick LWP question

From the LWP::UserAgent documentation:

$ua->credentials( $netloc, $realm, $uname, $pass )

Get/set the user name and password to be used for a realm.

The $netloc is a string of the form "<host>:<port>". The username and password will only be passed to this server. Example:

$ua->credentials("www.example.com:80", "Some Realm", "foo", "secret");

Doesn't look like the value you're using for $netloc follows the format defined in the docs.

--

See the Copyright notice on my home node.

Perl training courses

Replies are listed 'Best First'.
Re^2: quick LWP question
by vxp (Pilgrim) on Jun 23, 2009 at 16:09 UTC
    I tried both ways, including:
    $browser->credentials("hostname.domain.com:80", "EMAN Protected Resour +ce", "myusername", "mypassword");

    .. with the same (failed) result

      Please provide the response (print $response->as_string;)