File Coverage

blib/lib/IBM/StorageSystem/Export.pm
Criterion Covered Total %
statement 12 22 54.5
branch 0 6 0.0
condition n/a
subroutine 4 12 33.3
pod 0 1 0.0
total 16 41 39.0


line stmt bran cond sub pod time code
1             package IBM::StorageSystem::Export;
2              
3 1     1   6 use strict;
  1         2  
  1         33  
4 1     1   6 use warnings;
  1         1  
  1         35  
5              
6 1     1   6 use Carp qw(croak);
  1         2  
  1         110  
7              
8             our $VERSION = '0.01';
9             our @ATTR = qw(Name:Path Name Path Protocol Active Timestamp Options);
10              
11             foreach my $attr ( map lc, @ATTR ) {
12             {
13 1     1   5 no strict 'refs';
  1         3  
  1         256  
14             *{ __PACKAGE__ .'::'. $attr } = sub {
15 0     0     my( $self, $val ) = @_;
        0      
        0      
        0      
        0      
        0      
        0      
16 0 0         $val =~ s/\#/no/ if $val;
17 0 0         $self->{$attr} = $val if $val;
18 0           return $self->{$attr}
19             }
20             }
21             }
22              
23             sub new {
24 0     0 0   my( $class, $ibm, %args ) = @_;
25 0           my $self = bless {}, $class;
26 0 0         defined $args{'Name:Path'} or croak __PACKAGE__
27             . ' constructor failed: mandatory Name:Path argument not supplied';
28              
29 0           foreach my $attr ( keys %args ) { $self->{lc $attr} = $args{$attr} }
  0            
30              
31 0           return $self
32             }
33              
34             1;
35              
36             __END__