line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::FreeIPA::Base; |
2
|
|
|
|
|
|
|
$Net::FreeIPA::Base::VERSION = '3.0.2'; |
3
|
6
|
|
|
6
|
|
2286
|
use strict; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
154
|
|
4
|
6
|
|
|
6
|
|
19
|
use warnings; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
453
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Net::FreeIPA::Base provides basic class structure for Net::FreeIPA |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head2 Public methods |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=over |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=item new |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new |
20
|
|
|
|
|
|
|
{ |
21
|
0
|
|
|
0
|
1
|
|
my $this = shift; |
22
|
0
|
|
0
|
|
|
|
my $class = ref($this) || $this; |
23
|
0
|
|
|
|
|
|
my $self = {}; # here, it gives a reference on a hash |
24
|
0
|
|
|
|
|
|
bless $self, $class; |
25
|
|
|
|
|
|
|
|
26
|
0
|
0
|
|
|
|
|
return $self->_initialize(@_) ? $self : undef; |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=item error, warn, info, debug |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Convenience methods to access the log instance that might |
32
|
|
|
|
|
|
|
be passed during initialisation and set to $self->{log}. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
6
|
|
|
6
|
|
24
|
no strict 'refs'; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
638
|
|
37
|
|
|
|
|
|
|
foreach my $i (qw(error warn info debug)) { |
38
|
|
|
|
|
|
|
*{$i} = sub { |
39
|
0
|
|
|
0
|
|
|
my ($self, @args) = @_; |
40
|
0
|
0
|
|
|
|
|
if ($self->{log}) { |
41
|
0
|
|
|
|
|
|
return $self->{log}->$i(@args); |
42
|
|
|
|
|
|
|
} else { |
43
|
0
|
|
|
|
|
|
return; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
6
|
|
|
6
|
|
25
|
use strict 'refs'; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
171
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=back |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |