File Coverage

blib/lib/BeamerReveal/Object/Presentation.pm
Criterion Covered Total %
statement 15 29 51.7
branch 0 6 0.0
condition n/a
subroutine 5 6 83.3
pod 1 1 100.0
total 21 42 50.0


line stmt bran cond sub pod time code
1             # -*- cperl -*-
2             # ABSTRACT: Presentation object
3              
4              
5             package BeamerReveal::Object::Presentation;
6             our $VERSION = '20260208.1851'; # VERSION
7              
8 1     1   1180 use parent 'BeamerReveal::Object';
  1         2  
  1         6  
9 1     1   74 use Carp;
  1         1  
  1         55  
10              
11 1     1   3 use Data::Dumper;
  1         2  
  1         29  
12              
13 1     1   3 use BeamerReveal::TemplateStore;
  1         2  
  1         70  
14 1     1   8 use BeamerReveal::Log;
  1         2  
  1         348  
15              
16              
17             sub new {
18 0     0 1   my $class = shift;
19 0           my ( $chunkData, $lines, $lineCtr ) = @_;
20              
21 0           my $logger = $BeamerReveal::Log::logger;
22            
23 0 0         $class = (ref $class ? ref $class : $class );
24 0           my $self = {};
25 0           bless $self, $class;
26              
27 0           $self->{videos} = [];
28 0           foreach my $line ( @$lines ) {
29 0           ++$lineCtr;
30 0 0         ( $line =~ /^-(?\w+):(?.*)$/ )
31             or $logger->fatal( "Error: syntax incorrect in rvl file on line $lineCtr '$line'\n" );
32 0 0         if ( $+{command} eq 'parameters' ) {
33 0           $self->{parameters} = BeamerReveal::Object::readParameterLine( $+{payload} );
34             }
35             else {
36 0           $logger->fatal( "Error: unknown Presentation data on line $lineCtr '$line'\n" );
37             }
38             }
39              
40 0           return $self;
41             }
42             1;
43              
44             __END__