line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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
|
1
|
|
|
1
|
|
8056
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
166
|
|
17
|
1
|
|
|
1
|
|
7
|
use warnings::register; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
127
|
|
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
|
53
|
use OpenFrame::WebApp::User; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $VERSION = (split(/ /, '$Revision: 1.3 $'))[1]; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use base qw ( OpenFrame::WebApp::Factory ); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub get_types_class { |
26
|
|
|
|
|
|
|
my $self = shift; |
27
|
|
|
|
|
|
|
return OpenFrame::WebApp::User->types->{$self->type}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub new_user { |
31
|
|
|
|
|
|
|
my $self = shift; |
32
|
|
|
|
|
|
|
return $self->new_object( @_ ); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |