No, neither decoded-content nor status-line are provided. The provided methods are decoded_content and status_line. Note that - is not a valid character in a name.
According to Re^2: 500 Can't connect to localhost:80 (Connection Refused) at ./sample.pl line 19, you can access it with localhost or the hostname, but on the original post, you cannot access it with localhost. Which is it?
Is your web server configured to accept connections on an IPv6 address? Is there any more diagnostic information you can provide? There is very little to go on here.