HTTP::Response also has a ->is_redirect method. Check that and decide what to do.
In reply to Re: determine url redirection by Your Mother in thread determine url redirection by sylph001