lib/Rex/Commands/Notify.pm

filter: Statementstmt 83.3% 15 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 83.3% 20 / 24 CC 1 SCAR 1.8
CC
1
Cov
83%
notify
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Rex/Interface/Connection/Fake.pm ↑ Summary lib/Rex/Commands/Virtualization.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 =head1 NAME
6  
7 Rex::Commands::Notify - Notify a resource to execute.
8  
9 =head1 DESCRIPTION
10  
11 This module exports the notify() function.
12  
13 =head1 SYNOPSIS
14  
15 notify "run", "extract-archive";
16 notify $type, $resource_name;
17  
18 =head1 EXPORTED FUNCTIONS
19  
20 =cut
21  
22 package Rex::Commands::Notify;
23  
24 32 ▶use v5.14.4;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 32 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 32 our $VERSION = '1.16.1'; # VERSION
28  
29 32 require Rex::Exporter;
30  
31 32 ▶use vars qw(@EXPORT);
Subroutine BEGIN: called CC=1 SCAR=0.0
32 32 ▶use base qw(Rex::Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
33  
34 32 @EXPORT = qw(notify);
35  
36 =head2 notify($resource_type, $resource_name)
37  
38 This function will notify the given $resource_name of the given $resource_type to execute.
39  
40 =cut
41  
42 0 ▶sub notify {
Subroutine notify: not called CC=1 SCAR=6.9
Pod documented
43 0 my ( $resource_type, $resource_name ) = @_;
44 0 my $notify = Rex::get_current_connection()->{notify};
45 0 $notify->run(
46 type => $resource_type,
47 name => $resource_name,
48 );
49 }
50  
51 32 1;
« lib/Rex/Interface/Connection/Fake.pm ↑ Summary lib/Rex/Commands/Virtualization.pm »