also reformat PC19 for onward broadcast so that nodes coming in on loops are
dropped from those broadcasts.
3. make sure PC16,17,19,21 doen't affect locally connected nodes.
+4. Changed all instances of FileHandle to IO::File.
01Jun99=======================================================================
1. removed a output of an unwanted pc21 for isolated nodes
31May99=======================================================================
use DXLogPrint;
use DXBearing;
use CmdAlias;
-use FileHandle;
+use IO::File;
use Filter;
use Carp;
} else {
delete_package($package) if defined $Cache{$package}{mtime};
- my $fh = new FileHandle;
+ my $fh = new IO::File;
if (!open $fh, $filename) {
$errstr = "Syserr: can't open '$filename' $!";
return undef;
use DXUtil;
use DXM;
use DXDebug;
-use FileHandle;
+use IO::File;
use Carp;
use strict;
sub cread
{
my $fn = shift;
- my $fh = new FileHandle;
+ my $fh = new IO::File;
my $line = 0;
dbg('cron', "cron: reading $fn\n");
use strict;
use vars qw(%dbglevel $fp);
-use FileHandle;
use DXUtil;
use DXLog ();
use Carp;
@ISA = qw(Exporter);
@EXPORT = qw(Log Logclose);
-use FileHandle;
+use IO::File;
use DXVars;
use DXDebug ();
use DXUtil;
$mode = 'r' if !$mode;
$self->{mode} = $mode;
- my $fh = new FileHandle $self->{fn}, $mode, 0666;
+ my $fh = new IO::File $self->{fn}, $mode, 0666;
return undef if !$fh;
$fh->autoflush(1) if $mode ne 'r'; # make it autoflushing if writable
$self->{fh} = $fh;
package DXLog;
-use FileHandle;
+use IO::File;
use DXVars;
use DXDebug ();
use DXUtil;
use DXProtout;
use DXDebug;
use DXLog;
-use FileHandle;
+use IO::File;
+use Fcntl;
use Carp;
use strict;
if ($ref->{file}) { # a file
dbg('msg', "To be stored in $ref->{to}\n");
- my $fh = new FileHandle "$ref->{to}", "w";
+ my $fh = new IO::File "$ref->{to}", "w";
if (defined $fh) {
my $line;
foreach $line (@{$lines}) {
dbg('msg', "To be stored in $fn\n");
# now save the file, overwriting what's there, YES I KNOW OK! (I will change it if it's a problem)
- my $fh = new FileHandle "$fn", "w";
+ my $fh = new IO::File "$fn", "w";
if (defined $fh) {
my $rr = $ref->{rrreq} ? '1' : '0';
my $priv = $ref->{private} ? '1': '0';
my @f;
my $size;
- $file = new FileHandle;
+ $file = new IO::File;
if (!open($file, $fn)) {
print "Error reading $fn $!\n";
return undef;
my $fn = filename($msgno);
my @out;
- $file = new FileHandle;
+ $file = new IO::File;
if (!open($file, $fn)) {
print "Error reading $fn $!\n";
return undef;
my $fn = "$msgdir/$name";
my $msgno;
- my $fh = new FileHandle;
+ my $fh = new IO::File;
if (sysopen($fh, $fn, O_RDWR|O_CREAT, 0666)) {
$fh->autoflush(1);
$msgno = $fh->getline;
# initialise the message 'system', read in all the message headers
sub init
{
- my $dir = new FileHandle;
+ my $dir = new IO::File;
my @dir;
my $ref;
use DXUtil;
use DXLog;
use Julian;
-use FileHandle;
+use IO::File;
use Carp;
use strict;
# write the current data away
sub store
{
- my $fh = new FileHandle;
+ my $fh = new IO::File;
open $fh, "> $param" or confess "can't open $param $!";
print $fh "# Geomagnetic data parameter file last mod:", scalar gmtime, "\n";
print $fh "\$date = $date;\n";
package Julian;
-use FileHandle;
use DXDebug;
use Carp;
package Prefix;
+use IO::File;
use Carp;
use DXVars;
use DB_File;
sub store
{
my ($k, $l);
- my $fh = new FileHandle;
+ my $fh = new IO::File;
my $fn = "$main::data/prefix_data.pl";
confess "Prefix system not started" if !$db;
package Spot;
-use FileHandle;
+use IO::File;
use DXVars;
use DXDebug;
use DXUtil;
use DXVars;
use IO::Socket;
-use FileHandle;
+use IO::File;
use Open2;
use DXDebug;
use POSIX qw(dup);
# grep for expressions in various fields of the dx file
#
-use FileHandle;
+use IO::File;
use DXUtil;
use DXDebug;
use Spot;