File Coverage

blib/lib/BioX/Workflow/Command/run/Rules/Directives/Types/HPC.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package BioX::Workflow::Command::run::Rules::Directives::Types::HPC;
2              
3 1     1   751 use Moose::Role;
  1         4  
  1         12  
4              
5             has 'HPC' => (
6             is => 'rw',
7             isa => 'HashRef|ArrayRef',
8             default => sub { {} }
9             );
10              
11             # after 'BUILD' => sub {
12             # my $self = shift;
13             #
14             # $self->set_register_types(
15             # 'HPC',
16             # {
17             # builder => 'create_hpc_attr',
18             # lookup => ['^HPC$']
19             # }
20             # );
21             # };
22             #
23             # sub create_hpc_attr {
24             # my $self = shift;
25             # my $meta = shift;
26             # my $k = shift;
27             # my $v = shift;
28             #
29             # my $hpc_hash = $self->iter_hpc_array;
30             # $self->create_HASH_attr($meta, $k, $hpc_hash);
31             #
32             # $meta->add_attribute(
33             # $k => (
34             # is => 'rw',
35             # lazy_build => 1,
36             # )
37             # );
38             # }
39             #
40             # ##TODO Transform all of these to hashes
41             #
42             # =head3 iter_hpc_array
43             #
44             # =cut
45             #
46             # sub iter_hpc_array {
47             # my $self = shift;
48             # my $hpc_values = shift;
49             #
50             # if ( ref($hpc_values) eq 'HASH' ) {
51             # return $hpc_values;
52             # }
53             #
54             # my $hpc_hash = {};
55             # foreach my $href ( @{$aref} ) {
56             # if ( ref($href) eq 'HASH' ) {
57             # my @keys = keys %{$href};
58             # map { $hpc_hash->{$_} = $href->{$_} } @keys;
59             # }
60             # else {
61             # $self->app_log->warn(
62             # 'You seem to be mixing and matching HPC types.');
63             # return $hpc_values;
64             # }
65             # }
66             #
67             # return $hpc_hash;
68             # }
69              
70             1;