File: constructor

package info (click to toggle)
libafs-perl 2.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,244 kB
  • ctags: 268
  • sloc: perl: 5,159; ansic: 135; sh: 36; makefile: 7
file content (28 lines) | stat: -rwxr-xr-x 476 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
#!/usr/local/bin/perl -w

use blib;

use strict;
use AFS::PTS;
use AFS::Cell qw (localcell);

my ($sec, $cell, $pts);

die "Usage: $0 [security [cell]]\n" if $#ARGV > 1;

$sec  = 1 if $#ARGV == -1;
$cell = localcell if $#ARGV < 1;

$sec  = shift unless $sec;
$cell = shift unless $cell;

$pts = AFS::PTS->new($sec, $cell);
if ($AFS::CODE) { print "Error Code: $AFS::CODE\n"; }
else { print "OK \n"; }

test_it($pts);

sub test_it {
    my $self = shift;
    $self->DESTROY;
}