line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MogileFS::Domain; |
2
|
21
|
|
|
21
|
|
113
|
use strict; |
|
21
|
|
|
|
|
32
|
|
|
21
|
|
|
|
|
474
|
|
3
|
21
|
|
|
21
|
|
82
|
use warnings; |
|
21
|
|
|
|
|
27
|
|
|
21
|
|
|
|
|
384
|
|
4
|
21
|
|
|
21
|
|
85
|
use MogileFS::Server; |
|
21
|
|
|
|
|
41
|
|
|
21
|
|
|
|
|
459
|
|
5
|
21
|
|
|
21
|
|
120
|
use MogileFS::Util qw(throw); |
|
21
|
|
|
|
|
43
|
|
|
21
|
|
|
|
|
4870
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
MogileFS::Domain - domain class. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new_from_args { |
14
|
0
|
|
|
0
|
0
|
|
my ($class, $args, $class_factory) = @_; |
15
|
|
|
|
|
|
|
return bless { |
16
|
|
|
|
|
|
|
class_factory => $class_factory, |
17
|
0
|
|
|
|
|
|
%{$args}, |
|
0
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
}, $class; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Instance methods: |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
0
|
|
sub id { $_[0]{dmid} } |
24
|
0
|
|
|
0
|
0
|
|
sub name { $_[0]{namespace} } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub has_files { |
27
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
28
|
0
|
0
|
|
|
|
|
return 1 if $Mgd::_T_DOM_HAS_FILES; |
29
|
0
|
|
|
|
|
|
return Mgd::get_store()->domain_has_files($self->id); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub classes { |
33
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
34
|
0
|
|
|
|
|
|
return $self->{class_factory}->get_all($self); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub class { |
38
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
39
|
0
|
|
|
|
|
|
return $self->{class_factory}->get_by_name($self, $_[0]); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub observed_fields { |
43
|
0
|
|
|
0
|
0
|
|
return {}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |