lib/Video/PlaybackMachine/TimeLayout/RangeLayout.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 20 CC 1 SCAR 6.9
CC
1
Cov
0%
BUILDARGS
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Video::PlaybackMachine::TimeLayout::RangeLayout;
2  
3 our $VERSION = '0.09'; # VERSION
4  
5 ####
6 #### Video::PlaybackMachine::TimeLayout::RangeLayout
7 ####
8 #### $Revision$
9 ####
10 #### A TimeLayout that indicates that the FillProducer can produce
11 #### content for a certain minimum and a certain maximum amount of
12 #### time.
13 ####
14 #### An example is the FillShort producer, which plays short films.
15 #### It has short films available to it in a certain range of sizes.
16 #### It would return a RangeLayout consisting of the time of the
17 #### shortest short for the minimum and the time of the longest
18 #### fitting short for the maximum.
19 ####
20 #### NOTE: Not currently in use. May be removed shortly.
21 ####
22  
23 use Moo;
24  
25 use Carp;
26  
27 ############################ Class Constants #########################
28  
29 ############################# Class Methods ##########################
30  
31 has 'min_time' => ( is => 'ro' );
32  
33 has 'max_time' => ( is => 'ro' );
34  
35 ##
36 ## new()
37 ##
38 ## Arguments:
39 ## min_time: int -- minimum amount of time we can run
40 ## max_time: int -- maximum amount of time we can run
41 ##
42 sub BUILDARGS {
43 my $type = shift;
44 my ($min_time, $max_time) = @_;
45  
46 return { min_time => $min_time,
47 max_time => $max_time
48 };
49 }
50  
51  
52 ############################ Object Methods ####################
53  
54 ##
55 ## min_time()
56 ##
57 ## Returns the minimum amount of time the fill can take.
58 ##
59  
60 no Moo;
61  
62 1;