Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2023 08:37:16 GMT
From:      Jimmy Olgeni <olgeni@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ff57d9fddd56 - main - devel/p5-Mojo-Log-Clearable: Add new port
Message-ID:  <202304240837.33O8bGAK073806@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by olgeni:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ff57d9fddd566f6e7666de9920f55ba6c9ebfe15

commit ff57d9fddd566f6e7666de9920f55ba6c9ebfe15
Author:     Jimmy Olgeni <olgeni@FreeBSD.org>
AuthorDate: 2023-04-24 08:30:42 +0000
Commit:     Jimmy Olgeni <olgeni@FreeBSD.org>
CommitDate: 2023-04-24 08:36:03 +0000

    devel/p5-Mojo-Log-Clearable: Add new port
    
    Mojo::Log is a simple logger class. It holds a filehandle once it writes to
    a log, and changing "path" in Mojo::Log does not open a new filehandle for
    logging.
    
    Mojo::Log::Role::Clearable is a role that provides a "clear_handle" method
    and automatically calls it when "path" in Mojo::Log is modified, so the logging
    handle is reopened at the new path. The "clear_handle" method can also be used
    to reopen the logging handle after log rotation.
    
    This new Perl module is useful for anyone who wants to use Mojo::Log and also
    needs automatic log file rotation.
    
    WWW: https://metacpan.org/release/Mojo-Log-Clearable
---
 devel/Makefile                        |  1 +
 devel/p5-Mojo-Log-Clearable/Makefile  | 23 +++++++++++++++++++++++
 devel/p5-Mojo-Log-Clearable/distinfo  |  3 +++
 devel/p5-Mojo-Log-Clearable/pkg-descr | 10 ++++++++++
 devel/p5-Mojo-Log-Clearable/pkg-plist |  4 ++++
 5 files changed, 41 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 8e91bfcc9cc3..2a3641b8c1db 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2891,6 +2891,7 @@
     SUBDIR += p5-Module-Versions
     SUBDIR += p5-Module-Versions-Report
     SUBDIR += p5-Mojo-Base-XS
+    SUBDIR += p5-Mojo-Log-Clearable
     SUBDIR += p5-Mojolicious-Plugin-NYTProf
     SUBDIR += p5-Moo
     SUBDIR += p5-MooX-Aliases
diff --git a/devel/p5-Mojo-Log-Clearable/Makefile b/devel/p5-Mojo-Log-Clearable/Makefile
new file mode 100644
index 000000000000..326f2ab0198b
--- /dev/null
+++ b/devel/p5-Mojo-Log-Clearable/Makefile
@@ -0,0 +1,23 @@
+PORTNAME=	Mojo-Log-Clearable
+PORTVERSION=	1.001
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+MASTER_SITE_SUBDIR=	CPAN:DBOOK
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	olgeni@FreeBSD.org
+COMMENT=	Log rotation role for Mojo::Log
+WWW=		https://metacpan.org/pod/Mojo::Log::Clearable
+
+LICENSE=	ART20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${RUN_DEPENDS}
+RUN_DEPENDS=	p5-Mojolicious>9:www/p5-Mojolicious
+
+USES=		perl5
+
+NO_ARCH=	yes
+USE_PERL5=	modbuildtiny
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Mojo-Log-Clearable/distinfo b/devel/p5-Mojo-Log-Clearable/distinfo
new file mode 100644
index 000000000000..fa87d20516de
--- /dev/null
+++ b/devel/p5-Mojo-Log-Clearable/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1682323627
+SHA256 (Mojo-Log-Clearable-1.001.tar.gz) = 82e06a29d59e99ce260bfc69efb59deea795da246a638c2b439351b07b6c0a72
+SIZE (Mojo-Log-Clearable-1.001.tar.gz) = 13270
diff --git a/devel/p5-Mojo-Log-Clearable/pkg-descr b/devel/p5-Mojo-Log-Clearable/pkg-descr
new file mode 100644
index 000000000000..614de73fa7f9
--- /dev/null
+++ b/devel/p5-Mojo-Log-Clearable/pkg-descr
@@ -0,0 +1,10 @@
+Mojo::Log is a simple logger class. It holds a filehandle once it writes to
+a log, and changing "path" in Mojo::Log does not open a new filehandle for
+logging.
+
+Mojo::Log::Role::Clearable is a role that provides a "clear_handle" method
+and automatically calls it when "path" in Mojo::Log is modified, so the
+logging handle is reopened at the new path.
+
+The "clear_handle" method can also be used to reopen the logging handle
+after log rotation.
diff --git a/devel/p5-Mojo-Log-Clearable/pkg-plist b/devel/p5-Mojo-Log-Clearable/pkg-plist
new file mode 100644
index 000000000000..9934b5537490
--- /dev/null
+++ b/devel/p5-Mojo-Log-Clearable/pkg-plist
@@ -0,0 +1,4 @@
+%%SITE_PERL%%/Mojo/Log/Clearable.pm
+%%SITE_PERL%%/Mojo/Log/Role/Clearable.pm
+%%PERL5_MAN3%%/Mojo::Log::Clearable.3.gz
+%%PERL5_MAN3%%/Mojo::Log::Role::Clearable.3.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304240837.33O8bGAK073806>