File Coverage

blib/lib/App/EventStreamr/DVswitch/Mixer.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::Mixer;
2 4     4   49008 use Method::Signatures;
  4         149192  
  4         21  
3 4     4   2878 use Moo;
  4         18509  
  4         17  
4 4     4   4789 use namespace::clean;
  4         8943  
  4         21  
5              
6             # ABSTRACT: A DVswitch Process
7              
8             our $VERSION = '0.3'; # 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 { 'dvswitch' } );
15             has 'type' => ( is => 'ro', default => sub { 'mixer' } );
16              
17 4 0   4   3826 method _build_cmd() {
  0     0      
  0            
18 0 0         my $command = $self->{config}{commands}{dvswitch} ? $self->{config}{commands}{dvswitch} : 'dvswitch -h 0.0.0.0 -p $port';
19            
20 0           my %cmd_vars = (
21             port => $self->{config}{mixer}{port},
22             );
23              
24 0           $command =~ s/\$(\w+)/$cmd_vars{$1}/g;
25 0           return $command;
26             }
27              
28             1;
29              
30             __END__
31              
32             =pod
33              
34             =encoding UTF-8
35              
36             =head1 NAME
37              
38             App::EventStreamr::DVswitch::Mixer - A DVswitch Process
39              
40             =head1 VERSION
41              
42             version 0.3
43              
44             =head1 SYNOPSIS
45              
46             This Provides a pre-configured DVswitch process.
47              
48             =head1 DESCRIPTION
49              
50             This largely extends L<App::EventStreamr::Process>, provides
51             default cmds that can be overridden in the configuration.
52              
53             =head1 AUTHOR
54              
55             Leon Wright < techman@cpan.org >
56              
57             =head1 COPYRIGHT AND LICENSE
58              
59             This software is Copyright (c) 2014 by Leon Wright.
60              
61             This is free software, licensed under:
62              
63             The GNU Affero General Public License, Version 3, November 2007
64              
65             =cut