#!/usr/bin/perl -T ######### # Author: rmp # Last Modified: $Date: 2009-08-03 00:05:09 +0100 (Mon, 03 Aug 2009) $ # Id: $Id: logout 339 2009-08-02 23:05:09Z zerojinx $ # Source: $Source$ # $HeadURL: https://clearpress.svn.sourceforge.net/svnroot/clearpress/branches/prerelease-1.26/cgi-bin/logout $ # use strict; use warnings; use ClearPress::authdecor qw($AUTH_COOKIE); our $VERSION = do { my ($r) = q$Revision: 339 $ =~ /(\d+)/smx; $r; }; my $decor = ClearPress::authdecor->new(); my $cgi = $decor->cgi(); my $cookie = $cgi->cookie( -name => $AUTH_COOKIE, -value => q[], -expires => '-1d', ); $decor->username(q[]); print qq[Set-Cookie: $cookie\n]; if($ENV{HTTP_REFERER} !~ m{/logout}smix) { print qq[Location: $ENV{HTTP_REFERER}\n]; } print $decor->header(); print q[