in reply to Can't call method "url"

Did you check the return value from HTTP::Daemon->new? If you had, you would have noticed that $master is undefined. This is probably due to the fact that the port $PORT is already in use.