File Coverage

blib/lib/Metabrik/Remote/Windows.pm
Criterion Covered Total %
statement 9 15 60.0
branch n/a
condition 0 6 0.0
subroutine 3 5 60.0
pod 1 2 50.0
total 13 28 46.4


line stmt bran cond sub pod time code
1             #
2             # $Id$
3             #
4             # remote::windows Brik
5             #
6             package Metabrik::Remote::Windows;
7 1     1   737 use strict;
  1         3  
  1         28  
8 1     1   5 use warnings;
  1         2  
  1         59  
9              
10 1     1   7 use base qw(Metabrik::Remote::Winexe);
  1         2  
  1         257  
11              
12             sub brik_properties {
13             return {
14 0     0 1   revision => '$Revision$',
15             tags => [ qw(unstable) ],
16             author => 'GomoR ',
17             license => 'http://opensource.org/licenses/BSD-3-Clause',
18             attributes => {
19             datadir => [ qw(datadir) ],
20             host => [ qw(host) ],
21             user => [ qw(username) ],
22             password => [ qw(password) ],
23             registry => [ qw(key) ],
24             },
25             attributes_default => {
26             registry => 'HKLM',
27             },
28             commands => {
29             install => [ ], # Inherited
30             dump_registry => [ qw(key|OPTIONAL output|OPTIONAL) ],
31             },
32             };
33             }
34              
35             sub dump_registry {
36 0     0 0   my $self = shift;
37 0           my ($registry, $output) = @_;
38              
39 0   0       $registry ||= $self->registry;
40 0   0       $output ||= 'C:\\windows\\temp\\'.$registry.'.reg';
41              
42 0           return $self->execute("\"reg export $registry $output\"");
43             }
44              
45             1;
46              
47             __END__