|
From: <jgr...@us...> - 2003-09-12 00:34:40
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv12319/POPFile
Modified Files:
Loader.pm
Log Message:
USING PERLTRAY TO BUILD A POPFILE.EXE FOR WINDOWS
Makefile:
Suitable targets to use PerlTray to created popfile.exe and
popfileb.exe.
POPFile/Loader.pm:
Added version() accessor for version string and an option to
service so that it can be called from an external poller.
popfilew.pl:
Equivalent of popfile.pl which uses PerlTray to show an icon
in the system tray on Windows. This is designed to be turned
into popfile.exe by PerlTray.
Index: Loader.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Loader.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Loader.pm 11 Sep 2003 17:27:11 -0000 1.7
--- Loader.pm 12 Sep 2003 00:34:36 -0000 1.8
***************
*** 109,113 ****
$self->{reaper__} = sub { $self->CORE_reaper(@_) };
! print "\nPOPFile Engine $self->{version_string__} loading\n" if $self->{debug__};
}
--- 109,113 ----
$self->{reaper__} = sub { $self->CORE_reaper(@_) };
! print "\nPOPFile Engine loading\n" if $self->{debug__};
}
***************
*** 566,569 ****
--- 566,572 ----
print '} ' if $self->{debug__};
}
+
+ print "\n\nPOPFile Engine ", $self->version(), " running\n" if $self->{debug__};
+ flush STDOUT;
}
***************
*** 575,586 ****
# sleeps briefly
#
#
#---------------------------------------------------------------------------------------------
sub CORE_service
{
! my ( $self ) = @_;
! print "\n\nPOPFile Engine $self->{version_string__} running\n" if $self->{debug__};
! flush STDOUT;
# MAIN LOOP - Call each module's service() method to all it to
--- 578,589 ----
# sleeps briefly
#
+ # $nowait If 1 then don't sleep and don't loop
#
#---------------------------------------------------------------------------------------------
sub CORE_service
{
! my ( $self, $nowait ) = @_;
! $nowait = 0 if ( !defined( $nowait ) );
# MAIN LOOP - Call each module's service() method to all it to
***************
*** 600,604 ****
# CPU
! select(undef, undef, undef, 0.05);
# If we are on Windows then reap children here
--- 603,607 ----
# CPU
! select(undef, undef, undef, 0.05) if !$nowait;
# If we are on Windows then reap children here
***************
*** 611,615 ****
--- 614,622 ----
}
}
+
+ last if $nowait;
}
+
+ return $self->{alive__};
}
***************
*** 742,746 ****
}
! # SETTER
sub debug
--- 749,760 ----
}
! # GETTER/SETTER
!
! sub version
! {
! my ( $self ) = @_;
!
! return $self->{version_string__};
! }
sub debug
|