| 1 | =head1 NAME | ||
| 2 | |||
| 3 | OpenFrame::WebApp::User::Factory - a factory for creating users | ||
| 4 | |||
| 5 | =head1 SYNOPSIS | ||
| 6 | |||
| 7 | use OpenFrame::WebApp::User::Factory; | ||
| 8 | |||
| 9 | my $ufactory = new OpenFrame::WebApp::User::Factory()->type('webapp'); | ||
| 10 | my $user = $ufactory->new_user( @args ); | ||
| 11 | |||
| 12 | =cut | ||
| 13 | |||
| 14 | package OpenFrame::WebApp::User::Factory; | ||
| 15 | |||
| 16 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 4 | ▶ | use warnings::register; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | |||
| 19 | 4 | ▶ | use OpenFrame::WebApp::User; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | 4 | our $VERSION = (split(/ /, '$Revision: 1.3 $'))[1]; | |
| 22 | |||
| 23 | 4 | ▶ | use base qw ( OpenFrame::WebApp::Factory ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | |||
| 25 | 8 | ▶ | sub get_types_class { |
|
Subroutine
get_types_class: called CC=1 SCAR=0.0
Pod
documented
| |||
| 26 | 8 | my $self = shift; | |
| 27 | 8 | return OpenFrame::WebApp::User->types->{$self->type}; | |
| 28 | } | ||
| 29 | |||
| 30 | 4 | ▶ | sub new_user { |
|
Subroutine
new_user: called CC=1 SCAR=0.0
Pod
documented
| |||
| 31 | 4 | my $self = shift; | |
| 32 | 4 | return $self->new_object( @_ ); | |
| 33 | } | ||
| 34 | |||
| 35 | 4 | 1; | |
| 36 | |||
| 37 | __END__ | ||