File: Source.pm

package info (click to toggle)
libnetapp-perl 1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 384 kB
  • ctags: 226
  • sloc: perl: 4,539; makefile: 15
file content (37 lines) | stat: -rw-r--r-- 658 bytes parent folder | download
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
36
37
#
# $Id: Volume.pm 203 2008-06-20 18:00:43Z pmoore $
#

package NetApp::Volume::Source;

use version; $VERSION = version->new(qw$Revision: 203 $);

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;