projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sorted out inheritance
[spider.git]
/
perl
/
DXUser.pm
diff --git
a/perl/DXUser.pm
b/perl/DXUser.pm
index 7ce853c665513dc53a02315e42c59884de589c74..101340c8e16be12ceac1c627f09a2359fb7b5d06 100644
(file)
--- a/
perl/DXUser.pm
+++ b/
perl/DXUser.pm
@@
-29,12
+29,24
@@
$filename = undef;
qra => 'Locator',
email => 'E-mail Address',
priv => 'Privilege Level',
qra => 'Locator',
email => 'E-mail Address',
priv => 'Privilege Level',
- sort => 'Type of User',
lastin => 'Last Time in',
passwd => 'Password',
lastin => 'Last Time in',
passwd => 'Password',
- addr => 'Full Address'
+ addr => 'Full Address',
+ 'sort' => 'Type of User', # A - ak1a, U - User, S - spider cluster, B - BBS
);
);
+sub AUTOLOAD
+{
+ my $self = shift;
+ my $name = $AUTOLOAD;
+
+ return if $name =~ /::DESTROY$/;
+ $name =~ s/.*:://o;
+
+ die "Non-existant field '$AUTOLOAD'" if !$valid{$name};
+ @_ ? $self->{$name} = shift : $self->{$name} ;
+}
+
#
# initialise the system
#
#
# initialise the system
#
@@
-125,13
+137,13
@@
sub elements
}
#
}
#
-# return a prompt
together with the existing value
+# return a prompt
for a field
#
sub prompt
{
my ($self, $ele) = @_;
#
sub prompt
{
my ($self, $ele) = @_;
- return
"$valid{$ele} [$self->{$ele}]"
;
+ return
$valid{$ele}
;
}
#
}
#
@@
-167,5
+179,12
@@
sub enter
}
return 0;
}
}
return 0;
}
+
+# some variable accessors
+sub sort
+{
+ my $self = shift;
+ @_ ? $self->{sort} = shift : $self->{sort} ;
+}
1;
__END__
1;
__END__