| Pangloss documentation | Contained in the Pangloss distribution. |
Pangloss::Segment::Decline::NotTranslator - decline unless there's a user with translation capabilities in the session
$pipe->add_segment( Pangloss::Segment::NotTranslator->new )
This class inherits its interface from OpenFrame::WebApp::Segment::Decline
and OpenFrame::WebApp::Segment::User::Session.
Steve Purkis <spurkis@quiup.com>
Pangloss
| Pangloss documentation | Contained in the Pangloss distribution. |
package Pangloss::Segment::Decline::NotTranslator; 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 $user = $self->get_user_from_session || return 1; return $user->not_translator; } 1; __END__ #------------------------------------------------------------------------------