File Coverage

blib/lib/App/EventStreamr/DVswitch/Standby.pm
Criterion Covered Total %
statement 10 16 62.5
branch 0 4 0.0
condition n/a
subroutine 4 5 80.0
pod n/a
total 14 25 56.0


line stmt bran cond sub pod time code
1             package App::EventStreamr::DVswitch::Standby;
2 1     1   743 use Method::Signatures;
  1         2  
  1         7  
3 1     1   363 use Moo;
  1         2  
  1         6  
4 1     1   257 use namespace::clean;
  1         1  
  1         8  
5              
6             # ABSTRACT: A DVswitch Standby Process
7              
8             our $VERSION = '0.5'; # VERSION: Generated by DZP::OurPkg:Version
9              
10              
11             extends 'App::EventStreamr::Process';
12              
13             has 'cmd' => ( is => 'ro', lazy => 1, builder => 1 );
14             has 'id' => ( is => 'ro', default => sub { 'dvfile' } );
15             has 'type' => ( is => 'ro', default => sub { 'ingest' } );
16              
17 1 0   1   895 method _build_cmd() {
  0     0      
  0            
18 0 0         my $command = $self->{config}{commands}{file} ? $self->{config}{commands}{file} : 'dvsource-file -h $host -p $port -l $file';
19            
20             my %cmd_vars = (
21             file => $self->{config}{mixer}{loop},
22             host => $self->{config}{mixer}{host},
23             port => $self->{config}{mixer}{port},
24 0           );
25              
26 0           $command =~ s/\$(\w+)/$cmd_vars{$1}/g;
27 0           return $command;
28             }
29              
30             1;
31              
32             __END__
33              
34             =pod
35              
36             =encoding UTF-8
37              
38             =head1 NAME
39              
40             App::EventStreamr::DVswitch::Standby - A DVswitch Standby Process
41              
42             =head1 VERSION
43              
44             version 0.5
45              
46             =head1 SYNOPSIS
47              
48             This Provides a pre-configured DVswitch process.
49              
50             =head1 DESCRIPTION
51              
52             This largely extends L<App::EventStreamr::Process>, provides
53             default cmds that can be overridden in the configuration.
54              
55             =head1 AUTHOR
56              
57             Leon Wright < techman@cpan.org >
58              
59             =head1 COPYRIGHT AND LICENSE
60              
61             This software is Copyright (c) 2014 by Leon Wright.
62              
63             This is free software, licensed under:
64              
65             The GNU Affero General Public License, Version 3, November 2007
66              
67             =cut