From: Dirk Koopman Date: Sat, 22 Jan 2022 12:59:49 +0000 (+0000) Subject: remove Prot.pm, sort %valid fields X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb38b7e683f110d295e49b2d1aa75cb79f56fa41;p=spider.git remove Prot.pm, sort %valid fields --- diff --git a/perl/Bands.pm b/perl/Bands.pm index cc67dc23..aa5bc9e0 100644 --- a/perl/Bands.pm +++ b/perl/Bands.pm @@ -21,18 +21,18 @@ use vars qw(%bands %regions %aliases $bandsfn %valid); $bandsfn = localdata("bands.pl"); %valid = ( + band => '0,BAND,parraypairs', + beacon => '0,BEACON,parraypairs', cw => '0,CW,parraypairs', - ssb => '0,SSB,parraypairs', data => '0,DATA,parraypairs', - sstv => '0,SSTV,parraypairs', + fax => '0,FAX,parraypairs', fstv => '0,FSTV,parraypairs', - rtty => '0,RTTY,parraypairs', - pactor => '0,PACTOR,parraypairs', packet => '0,PACKET,parraypairs', + pactor => '0,PACTOR,parraypairs', repeater => '0,REPEATER,parraypairs', - fax => '0,FAX,parraypairs', - beacon => '0,BEACON,parraypairs', - band => '0,BAND,parraypairs', + rtty => '0,RTTY,parraypairs', + ssb => '0,SSB,parraypairs', + sstv => '0,SSTV,parraypairs', ); # load the band data diff --git a/perl/Prot.pm b/perl/Prot.pm deleted file mode 100644 index 89847c48..00000000 --- a/perl/Prot.pm +++ /dev/null @@ -1,61 +0,0 @@ -# -# Base class for OO version of all protocol stuff -# - -package Prot; - -use strict; - - -use DXUtil; -use DXDebug; -use vars qw(%valid); - -%valid = ( - bellflag => '0,Bell?', - datetime => '0,Date/Time,atime', - dxcall => '0,DX Callsign', - dxcount => '0,DX Count', - freq => '0,Frequency', - fromcall => '0,From Callsign', - fromnode => '0,From Node', - hereflag => '0,Here?,yesno', - hops => '0,No. of hops', - nodelist => '0,Node List,parray', - origin => '0,Original Node', - privflag => '0,Private?,yesno', - rrflag => '0,RR Req.?,yesno', - sort => '0,Sort', - sysopflag => '0,Sysop flag', - talkflag => '0,Talk mode', - text => '0,Text', - tocall => '0,To Callsign', - tonode => '0,To Node', - version => '0,Node Version', - vianode => '0,Via Node', - wwvcount => '0,WWV Count', - ); - - -sub new -{ - my $pkg = shift; - my $sort = shift; - my $self = bless { sort => $sort }, $pkg; - return $self; -} - -sub AUTOLOAD -{ - no strict; - my $name = $AUTOLOAD; - return if $name =~ /::DESTROY$/; - $name =~ s/^.*:://o; - - confess "Non-existant field '$AUTOLOAD'" if !$valid{$name}; - *$AUTOLOAD = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}}; - goto &$AUTOLOAD; -} - -1; -__END__