package WebGUI::Macro::getUri; #------------------------------------------------------------------- # WebGUI is Copyright 2001-2006 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using # this software. #------------------------------------------------------------------- # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- use strict; =head1 NAME Package WebGUI::Macro::getUri =head1 DESCRIPTION Macro for getting the "complete url", properly named uri, including query_string which Page(url) does not return. =head2 process ( ) If the macro called without any property it will return the current uri. =cut #------------------------------------------------------------------- sub process { my $session = shift; my $url = $session->url->getRequestedUrl; foreach ($session->form->param) { $url = $session->url->append($url, $session->url->escape($_).'='.$session->url->escape($session->form->process($_))); } return $url; } 1;