[svn:p5ee] r13306 - p5ee/trunk/App-Context/lib/App/Request

[email protected] Fri, 11 Sep 2009 06:51:10 -0700 (PDT)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
Author: spadkins
Date: Fri Sep 11 06:51:10 2009
New Revision: 13306

Modified:
   p5ee/trunk/App-Context/lib/App/Request/CGI.pm

Log:
added the url() method to support putting the URL into the form tag in App::Widget

Modified: p5ee/trunk/App-Context/lib/App/Request/CGI.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Request/CGI.pm	(original)
+++ p5ee/trunk/App-Context/lib/App/Request/CGI.pm	Fri Sep 11 06:51:10 2009
@@ -668,5 +668,34 @@
     return($header);
 }
 
+#############################################################################
+# url()
+#############################################################################
+
+=head2 url()
+
+The url() method returns information about the request url.
+
+    * Signature: $url = $request->url();
+    * Return: $url   string
+
+    Sample Usage: 
+
+    $url = $request->url();
+
+=cut
+
+sub url {
+    &App::sub_entry if ($App::trace);
+    my ($self) = @_;
+    my ($url);
+    my $cgi = $self->{cgi};
+    if ($cgi) {
+        $url = $cgi->url(-path_info=>1);
+    }
+    &App::sub_exit($url) if ($App::trace);
+    return($url);
+}
+
 1;