+12Mar03=======================================================================
+1. added HC and QRZ.com to possible QSL locations, if you want to pick up
+historical info (ie start again), run create_qsl.pl after update and restart
+the node (which you will need to do anyway).
11Mar03=======================================================================
1. Changed the name of show/qsl to show/dxqsl.
2. Alter Commands_en.hlp to match new name and issue manual updates (g0vgs)
#
# The structure of the base is:-
#
-# [next, prev, max objects, count ]
+# [next, prev, max objects, count, <coderef to function to call on deletion> ]
#
#
my $pkg = shift;
my $name = shift;
my $max = shift;
+ my $coderef = shift;
confess "LRU->newbase requires a name and maximal count" unless $name && $max;
- return $pkg->SUPER::new({ }, $max, 0, $name);
+ return $pkg->SUPER::new({ }, $max, 0, $name, $coderef);
}
sub get
my $q = $self->obj->{$call};
confess("$call is already removed") unless $q;
dbg("LRU $self->[5] cache remove $call now $self->[4]/$self->[3]") if isdbg('lru');
+ &{$self->[5]}($q->obj) if $self->[5];
$q->obj(1);
$q->SUPER::del;
delete $self->obj->{$call};
dbg("load Storable from CPAN");
return undef;
}
- import Storable qw(nfreeze thaw);
+ import Storable qw(nfreeze freeze thaw);
my %u;
if ($mode) {
$dbm = tie (%u, 'DB_File', $ufn, O_CREAT|O_RDWR, 0666, $DB_BTREE) or confess "can't open qsl file: $qslfn ($!)";
my $t = shift;
my $by = shift;
- my @tok = map {/^BUR/ || is_callsign($_) ? $_ : ()} split(/\b/, uc $line);
+ my @tok = map {/^(?:HC|BUR|QRZ|HOME)/ || is_callsign($_) ? $_ : ()} split(/\b/, uc $line);
foreach my $man (@tok) {
- $man = 'BUREAU' if $man =~ /^BUR/;
+ if ($man =~ /^BUR/) {
+ $man = 'BUREAU';
+ } elsif ($man eq 'HC' || $man =~ /^HOM/) {
+ $man = 'HOME CALL';
+ } elsif ($man =~ /^QRZ/) {
+ $man = 'QRZ.com';
+ }
my ($r) = grep {$_->[0] eq $man} @{$self->[1]};
if ($r) {
$r->[1]++;