line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package TMDB; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
####################### |
4
|
|
|
|
|
|
|
# LOAD MODULES |
5
|
|
|
|
|
|
|
####################### |
6
|
1
|
|
|
1
|
|
768
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
7
|
1
|
|
|
1
|
|
7
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
49
|
|
8
|
1
|
|
|
1
|
|
14
|
use Carp qw(croak carp); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
91
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
####################### |
11
|
|
|
|
|
|
|
# VERSION |
12
|
|
|
|
|
|
|
####################### |
13
|
|
|
|
|
|
|
our $VERSION = '1.2.0'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
####################### |
16
|
|
|
|
|
|
|
# LOAD CPAN MODULES |
17
|
|
|
|
|
|
|
####################### |
18
|
1
|
|
|
1
|
|
791
|
use Object::Tiny qw(session); |
|
1
|
|
|
|
|
433
|
|
|
1
|
|
|
|
|
6
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
####################### |
21
|
|
|
|
|
|
|
# LOAD DIST MODULES |
22
|
|
|
|
|
|
|
####################### |
23
|
1
|
|
|
1
|
|
621
|
use TMDB::Genre; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
24
|
1
|
|
|
1
|
|
714
|
use TMDB::Movie; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
11
|
|
25
|
1
|
|
|
1
|
|
693
|
use TMDB::TV; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
26
|
1
|
|
|
1
|
|
507
|
use TMDB::Config; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
27
|
1
|
|
|
1
|
|
558
|
use TMDB::Person; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
28
|
1
|
|
|
1
|
|
543
|
use TMDB::Search; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
29
|
1
|
|
|
1
|
|
511
|
use TMDB::Company; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
30
|
1
|
|
|
1
|
|
26
|
use TMDB::Session; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
31
|
1
|
|
|
1
|
|
496
|
use TMDB::Collection; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
####################### |
34
|
|
|
|
|
|
|
# PUBLIC METHODS |
35
|
|
|
|
|
|
|
####################### |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
## ==================== |
38
|
|
|
|
|
|
|
## CONSTRUCTOR |
39
|
|
|
|
|
|
|
## ==================== |
40
|
|
|
|
|
|
|
sub new { |
41
|
0
|
|
|
0
|
0
|
|
my ( $class, @args ) = @_; |
42
|
0
|
|
|
|
|
|
my $self = {}; |
43
|
0
|
|
|
|
|
|
bless $self, $class; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# Init Session |
46
|
0
|
|
|
|
|
|
$self->{session} = TMDB::Session->new(@args); |
47
|
0
|
|
|
|
|
|
return $self; |
48
|
|
|
|
|
|
|
} ## end sub new |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
## ==================== |
51
|
|
|
|
|
|
|
## TMDB OBJECTS |
52
|
|
|
|
|
|
|
## ==================== |
53
|
|
|
|
|
|
|
sub collection { |
54
|
0
|
|
|
0
|
0
|
|
return TMDB::Collection->new( |
55
|
|
|
|
|
|
|
session => shift->session, |
56
|
|
|
|
|
|
|
@_ |
57
|
|
|
|
|
|
|
); |
58
|
|
|
|
|
|
|
} ## end sub collection |
59
|
0
|
|
|
0
|
0
|
|
sub company { return TMDB::Company->new( session => shift->session, @_ ); } |
60
|
0
|
|
|
0
|
0
|
|
sub config { return TMDB::Config->new( session => shift->session, @_ ); } |
61
|
0
|
|
|
0
|
0
|
|
sub genre { return TMDB::Genre->new( session => shift->session, @_ ); } |
62
|
0
|
|
|
0
|
0
|
|
sub movie { return TMDB::Movie->new( session => shift->session, @_ ); } |
63
|
0
|
|
|
0
|
0
|
|
sub tv { return TMDB::TV->new( session => shift->session, @_ ); } |
64
|
0
|
|
|
0
|
0
|
|
sub person { return TMDB::Person->new( session => shift->session, @_ ); } |
65
|
0
|
|
|
0
|
0
|
|
sub search { return TMDB::Search->new( session => shift->session, @_ ); } |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
####################### |
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |