| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package IBM::StorageSystem::Service; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 5 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 34 |  | 
| 4 | 1 |  |  | 1 |  | 5 | use warnings; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 27 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 1 |  |  | 1 |  | 5 | use Carp qw(croak); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 109 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | our $VERSION = '0.01'; | 
| 9 |  |  |  |  |  |  | our @ATTR = qw(active configured name); | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | foreach my $attr ( map lc, @ATTR ) { | 
| 12 |  |  |  |  |  |  | { | 
| 13 | 1 |  |  | 1 |  | 5 | no strict 'refs'; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 278 |  | 
| 14 |  |  |  |  |  |  | *{ __PACKAGE__ .'::'. $attr } = sub { | 
| 15 | 0 |  |  | 0 |  |  | my( $self, $val ) = @_; | 
|  |  |  |  | 0 |  |  |  | 
|  |  |  |  | 0 |  |  |  | 
| 16 | 0 | 0 |  |  |  |  | $self->{$attr} = $val if $val; | 
| 17 | 0 |  |  |  |  |  | return $self->{$attr} | 
| 18 |  |  |  |  |  |  | } | 
| 19 |  |  |  |  |  |  | } | 
| 20 |  |  |  |  |  |  | } | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | sub new { | 
| 23 | 0 |  |  | 0 | 0 |  | my( $class, $ibm, %args ) = @_; | 
| 24 | 0 |  |  |  |  |  | my $self = bless {}, $class; | 
| 25 | 0 | 0 |  |  |  |  | defined $args{'Name'} or croak __PACKAGE__ . ' constructor failed: mandatory Name argument not supplied'; | 
| 26 | 0 |  |  |  |  |  | $self->{ name } = $args{Name}; | 
| 27 |  |  |  |  |  |  |  | 
| 28 | 0 | 0 |  |  |  |  | if ( defined $args{'Is_active'}     )	{ $self->{ active }	= $args{'Is_active'}	 } | 
|  | 0 |  |  |  |  |  |  | 
| 29 | 0 | 0 |  |  |  |  | if ( defined $args{'Is_configured'} )	{ $self->{ configured }	= $args{'Is_configured'} } | 
|  | 0 |  |  |  |  |  |  | 
| 30 | 0 | 0 |  |  |  |  | if ( defined $args{'Enabled'}	    )	{ $self->{ enabled }	= $args{'Enabled'}	 } | 
|  | 0 |  |  |  |  |  |  | 
| 31 | 0 | 0 |  |  |  |  | if ( defined $args{'Configured'}    )	{ $self->{ configured }	= $args{'Configured'}	 } | 
|  | 0 |  |  |  |  |  |  | 
| 32 |  |  |  |  |  |  |  | 
| 33 | 0 |  |  |  |  |  | return $self | 
| 34 |  |  |  |  |  |  | } | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | 1; | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | __END__ |