blib/script/hpppm_demand.pl untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 27 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/local/bin/perl -w
2  
3 =head1 Purpose and Change log
4  
5  
6 Changed by Date Comment
7
8 =cut
9  
10 use strict;
11 use FieldParser qw(parser);
12 use HPPPM::Demand::Management;
13  
14 my ($hpppm, $tags, $inputs, $req, $fields, $res, $ret);
15  
16 #Initialize HPPPM::Demand::Management
17 $hpppm = HPPPM::Demand::Management->new();
18  
19 $fields = $hpppm->validate_read_cmdargs(@ARGV);
20 $tags = $hpppm->get_inputs($hpppm->get_current_oper());
21 $inputs = FieldParser::parser($fields, $tags);
22 $ret = $hpppm->validate_inputs($inputs);
23 $ret = $hpppm->validate_tokens($inputs->{'fields'})
24 if grep /^fields$/, @{ $tags };
25  
26 $req = $hpppm->create_request($inputs);
27 $res = $hpppm->post_request($inputs->{'serviceUrl'}, $req);
28 $ret = $hpppm->extract($res, ['faultcode', 'faultstring',
29 'exception:detail', 'id', 'return']);
30  
31 print $res;