| Pangloss documentation | Contained in the Pangloss distribution. |
Pangloss::Segment::Decline::NoUserInSession - decline unless there's a user in the session
$pipe->add_segment( Pangloss::Segment::NoUserInSession->new )
Inherits from OpenFrame::WebApp::Segment::Decline and
OpenFrame::WebApp::Segment::User::Session::Session.
Steve Purkis <spurkis@quiup.com>
| Pangloss documentation | Contained in the Pangloss distribution. |
package Pangloss::Segment::Decline::NoUserInSession; use base qw( OpenFrame::WebApp::Segment::Decline OpenFrame::WebApp::Segment::User::Session ); our $VERSION = ((require Pangloss::Version), $Pangloss::VERSION)[1]; our $REVISION = (split(/ /, ' $Revision: 1.3 $ '))[2]; sub should_decline { my $self = shift; my $sess = $self->get_session_from_store || return 1; return $sess->get('user') ? 0 : 1; } 1; __END__ #------------------------------------------------------------------------------