| 1 | =head1 NAME | ||
| 2 | |||
| 3 | OpenFrame::WebApp::Segment::User::EnvLoader - a pipeline segment to load users | ||
| 4 | from the environment. | ||
| 5 | |||
| 6 | =head1 SYNOPSIS | ||
| 7 | |||
| 8 | # see OpenFrame::WebApp::Segment::User::Loader for usage | ||
| 9 | # loads user specified by $ENV{REMOTE_USER} | ||
| 10 | |||
| 11 | =cut | ||
| 12 | |||
| 13 | package OpenFrame::WebApp::Segment::User::EnvLoader; | ||
| 14 | |||
| 15 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 1 | ▶ | use warnings::register; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | 1 | our $VERSION = (split(/ /, '$Revision: 1.2 $'))[1]; | |
| 19 | |||
| 20 | 1 | ▶ | use base qw( OpenFrame::WebApp::Segment::User::Loader ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | |||
| 22 | 1 | ▶ | sub find_user_id { |
|
Subroutine
find_user_id: called CC=1 SCAR=0.0
Pod
documented
| |||
| 23 | 1 | my $self = shift; | |
| 24 | 1 | return $self->look_in_env; | |
| 25 | } | ||
| 26 | |||
| 27 | 1 | ▶ | sub look_in_env { |
|
Subroutine
look_in_env: called CC=1 SCAR=0.0
Pod
documented
| |||
| 28 | 1 | my $self = shift; | |
| 29 | 1 | return $ENV{REMOTE_USER}; | |
| 30 | } | ||
| 31 | |||
| 32 | |||
| 33 | 1 | 1; | |
| 34 | |||
| 35 | __END__ | ||