use List::Util qw(first);
+#
+# public/helper functions
+#
+
sub parse_html_template {
my $self = shift;
my $name = shift;
return "controller.pl?${query}";
}
+sub redirect_to {
+ my $self = shift;
+ my $url = $self->url_for(@_);
+
+ print $::cgi->redirect($url);
+}
+
+#
+# private functions -- for use in Base only
+#
+
sub _run_action {
my $self = shift;
my $action = "action_" . shift;
<a href="[% SELF.url_for(controller => 'Message', action => 'new', recipient_id => 42) %]">create new message</a>
+=item redirect_to %url_params
+
+Redirects the browser to a new URL by outputting a HTTP redirect
+header. The URL is generated by calling L</url_for> with
+C<%url_params>.
+
=back
=head2 PRIVATE FUNCTIONS