| 1 | package IBM::StorageSystem::Disk; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | ▶ | use Carp qw(croak); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 2 | our $VERSION = '0.01'; | |||||||||
| 9 | 2 | our @ATTR = qw(Name File_system Failure_group Type Pool Status Availability Timestamp Block_properties); | |||||||||
| 10 | |||||||||||
| 11 | 2 | foreach my $attr ( map lc, @ATTR ) { | |||||||||
| 12 | { | ||||||||||
| 13 | 2 | ▶ | no strict 'refs'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 18 | ▶ | *{ __PACKAGE__ .'::'. $attr } = sub { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=14.6
| |||||||||||
| 15 | 0 | my( $self, $val ) = @_; | |||||||||
| 16 | 0 | ▶ | $self->{$attr} = $val if $val; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | return $self->{$attr} | |||||||||
| 18 | } | ||||||||||
| 19 | 18 | } | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 23 | 0 | my( $class, $ibm, %args ) = @_; | |||||||||
| 24 | 0 | my $self = bless {}, $class; | |||||||||
| 25 | 0 | ▶ | defined $args{Name} or croak 'Constructor failed: mandatory Name argument not supplied'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | |||||||||||
| 27 | 0 | foreach my $attr ( @ATTR ) { $self->{lc $attr} = $args{$attr} } | |||||||||
| 28 | |||||||||||
| 29 | 0 | return $self | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 2 | 1; | |||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||