Solstice::View::Redirect - The view for Redirect


Solstice documentation Contained in the Solstice distribution.

Index


Code Index:

NAME

Top

Solstice::View::Redirect - The view for Redirect

SYNOPSIS

Top

  # See L<Solstice::View> for usage.

DESCRIPTION

Top

This is the view for the page Redirect

The canonical solstice redirector. Give it a URL, users will be redirected to it.

Export

None by default.

Methods

generateParams()

AUTHOR

Top

Catalyst Research & Development Group, <catalyst@u.washington.edu>

VERSION

Top

$Revision: $

SEE ALSO

Top

Solstice::View, perl.

COPYRIGHT

Top


Solstice documentation Contained in the Solstice distribution.
package Solstice::View::Redirect;

# $Id: $

use strict;
use warnings;
use 5.006_000;

use base qw(Solstice::View::Download);

use Solstice::Server;

use constant TRUE  => 1;
use constant FALSE => 0;

our ($VERSION) = ('$Revision: $' =~ /^\$Revision:\s*([\d.]*)/);

sub new {
    my $obj = shift;
    my $self = $obj->SUPER::new(@_);
    
    return $self;
}

sub sendHeaders {
    my $self = shift;
    my $server = Solstice::Server->new();

    $server->addHeader('Location', $self->getModel());
    $server->setStatus(302);
    $server->printHeaders();
}


sub printData {
    my $self = shift;

    print "<a href='".$self->getModel()."'>Click here...</a>";

    return TRUE;
}

1;
__END__