File: Source.pm

package info (click to toggle)
libnetapp-perl 500.002-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 464 kB
  • sloc: perl: 5,695; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

package NetApp::Volume::Source;

our $VERSION = '500.002';
$VERSION = eval $VERSION;  ##  no critic: StringyEval

use strict;
use warnings;

use Class::Std;
use Params::Validate qw( :all );

{

    my %hostname_of	:ATTR( get => 'hostname' );
    my %volume_of	:ATTR( get => 'volume' );

    sub BUILD {

        my ($self,$ident,$args_ref) = @_;

        my @args = %$args_ref;

        my (%args) 	= validate( @args, {
            hostname	=> { type	=> SCALAR },
            volume	=> { type	=> SCALAR },
        });

        $hostname_of{$ident}	= $args{hostname};
        $volume_of{$ident}	= $args{volume};
    }

}

1;