$ua = LWP::UserAgent->new( %options )
This method constructs a new LWP::UserAgent object and returns it. Key/value pair arguments may be provided to set up the initial state. The following options correspond to attribute methods described below:
KEY DEFAULT
----------- --------------------
agent "libwww-perl/#.###"
from undef
conn_cache undef
cookie_jar undef
default_headers HTTP::Headers->new
local_address undef
max_size undef
max_redirect 7
parse_head 1
protocols_allowed undef
protocols_forbidden undef requests_redirectable ['GET', 'HEAD']
timeout 180
The following additional options are also accepted: If the env_proxy option is passed in with a TRUE value, then proxy settings are read from environment variables (see env_proxy() method below). If the keep_alive option is passed in, then a LWP::ConnCache is set up (see conn_cache() method below). The keep_alive value is passed on as the total_capacity for the connection cache.