Perl module libalarm allows multiple queued alarms. This module is an attempt to enhance Perl's built-in alarm/$SIG{ALRM} functionality.
WWW: http://search.cpan.org/~johnsca/libalarm-1.0/ PR: ports/122253 Submitted by: Mykola Marzhan <delgod@portaone.com> Approved by: araujo (mentor)
This commit is contained in:
parent
4fe538d768
commit
e71fd1fb0d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=214206
6 changed files with 67 additions and 0 deletions
|
@ -1382,6 +1382,7 @@
|
|||
SUBDIR += p5-Java
|
||||
SUBDIR += p5-Lexical-Alias
|
||||
SUBDIR += p5-Lexical-Persistence
|
||||
SUBDIR += p5-libalarm
|
||||
SUBDIR += p5-Lingua-JA-Fold
|
||||
SUBDIR += p5-List-Cycle
|
||||
SUBDIR += p5-List-Group
|
||||
|
|
26
devel/p5-libalarm/Makefile
Normal file
26
devel/p5-libalarm/Makefile
Normal file
|
@ -0,0 +1,26 @@
|
|||
# New ports collection makefile for: p5-libalarm
|
||||
# Date created: March 27, 2008
|
||||
# Whom: Marzhan Mykola <delgod@portaone.com>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= libalarm
|
||||
PORTVERSION= 1.0
|
||||
CATEGORIES= devel perl5
|
||||
MASTER_SITES= CPAN/Alarm
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
||||
MAINTAINER= delgod@portaone.com
|
||||
COMMENT= Allow multiple, queued alarms
|
||||
|
||||
PERL_CONFIGURE= yes
|
||||
|
||||
MAN3= Alarm::_TieSIG.3 \
|
||||
Alarm::Concurrent.3 \
|
||||
Alarm::Queued.3
|
||||
|
||||
post-patch:
|
||||
@${RM} ${WRKSRC}/lib/Alarm/Concurrent.pm.orig
|
||||
|
||||
.include <bsd.port.mk>
|
3
devel/p5-libalarm/distinfo
Normal file
3
devel/p5-libalarm/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
MD5 (libalarm-1.0.tar.gz) = 7f39e762ed53f707309f77874f54f038
|
||||
SHA256 (libalarm-1.0.tar.gz) = 80a0c7b7a3b8bf0a36969a1baeda26e98706d28dbd5fee5de9dce63c83569180
|
||||
SIZE (libalarm-1.0.tar.gz) = 7223
|
26
devel/p5-libalarm/files/patch-lib__Alarm__Concurrent.pm
Normal file
26
devel/p5-libalarm/files/patch-lib__Alarm__Concurrent.pm
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- ./lib/Alarm/Concurrent.pm.orig 2004-05-11 22:06:28.000000000 +0000
|
||||
+++ ./lib/Alarm/Concurrent.pm 2008-03-27 16:18:44.000000000 +0000
|
||||
@@ -198,12 +198,14 @@
|
||||
=cut
|
||||
sub setalarm($$) {
|
||||
my ($alarm, $code) = @_;
|
||||
+ my $alarm_id = 0;
|
||||
|
||||
unless(not defined($code) or UNIVERSAL::isa($code, 'CODE')) {
|
||||
croak("Alarm handler must be CODEREF");
|
||||
}
|
||||
|
||||
push( @ALARM_QUEUE, [ $alarm, time(), $code ] );
|
||||
+ $alarm_id = $#ALARM_QUEUE;
|
||||
|
||||
my $time_remaining;
|
||||
$time_remaining = $ALARM_QUEUE[$ACTIVE_ALARM][1];
|
||||
@@ -214,6 +216,8 @@
|
||||
$ACTIVE_ALARM = $#ALARM_QUEUE;
|
||||
CORE::alarm($alarm);
|
||||
}
|
||||
+
|
||||
+ return $alarm_id;
|
||||
}
|
||||
|
||||
=item clearalarm INDEX LENGTH
|
4
devel/p5-libalarm/pkg-descr
Normal file
4
devel/p5-libalarm/pkg-descr
Normal file
|
@ -0,0 +1,4 @@
|
|||
This module is an attempt to enhance Perl's built-in
|
||||
alarm/$SIG{ALRM} functionality.
|
||||
|
||||
WWW: http://search.cpan.org/~johnsca/libalarm-1.0/
|
7
devel/p5-libalarm/pkg-plist
Normal file
7
devel/p5-libalarm/pkg-plist
Normal file
|
@ -0,0 +1,7 @@
|
|||
%%SITE_PERL%%/Alarm/_TieSIG.pm
|
||||
%%SITE_PERL%%/Alarm/Concurrent.pm
|
||||
%%SITE_PERL%%/Alarm/Queued.pm
|
||||
@dirrmtry %%SITE_PERL%%/Alarm
|
||||
%%SITE_PERL%%/%%PERL_ARCH%%/auto/libalarm/.packlist
|
||||
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/libalarm
|
||||
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Hash
|
Loading…
Reference in a new issue