Skip to content

Commit

Permalink
devel/p5-Tie-Sub: Add new port
Browse files Browse the repository at this point in the history
The module ties the subroutine to a hash.  The subroutine is executed
at fetch hash.

Approved by:	hrs (mentor)
  • Loading branch information
nanorkyo committed Jan 9, 2024
1 parent 1c3d203 commit a5d69a4
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Expand Up @@ -3701,6 +3701,7 @@
SUBDIR += p5-Tie-Restore
SUBDIR += p5-Tie-ShareLite
SUBDIR += p5-Tie-Simple
SUBDIR += p5-Tie-Sub
SUBDIR += p5-Tie-ToObject
SUBDIR += p5-Tie-Util
SUBDIR += p5-Tie-iCal
Expand Down
29 changes: 29 additions & 0 deletions devel/p5-Tie-Sub/Makefile
@@ -0,0 +1,29 @@
PORTNAME= Tie-Sub
PORTVERSION= 1.001
CATEGORIES= devel
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-

MAINTAINER= nork@FreeBSD.org
COMMENT= Tying a subroutine, function or method to a hash
WWW= https://metacpan.org/release/Tie-Sub

LICENSE= ART10 GPLv1+
LICENSE_COMB= dual

RUN_DEPENDS= p5-Params-Validate>0:devel/p5-Params-Validate
TEST_DEPENDS= p5-Test-NoWarnings>=0:devel/p5-Test-NoWarnings \
p5-Test-Perl-Critic>=0:textproc/p5-Test-Perl-Critic \
p5-Test-Pod-Coverage>=0:devel/p5-Test-Pod-Coverage \
p5-Test-Pod>0:devel/p5-Test-Pod

USES= perl5 # dos2unix: test not work #
USE_PERL5= configure

PLIST_FILES= ${SITE_MAN3_REL}/Tie::Sub.3.gz \
${SITE_PERL_REL}/Tie/Sub.pm

NO_ARCH= yes
TEST_ENV= AUTHOR_TESTING=1 # RELEASE_TESTING=1: test not work #

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions devel/p5-Tie-Sub/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1697404202
SHA256 (Tie-Sub-1.001.tar.gz) = ef71a04826d1362b2b76ecb21ce173c37d38a47a9fec283aa982435890f4f1b1
SIZE (Tie-Sub-1.001.tar.gz) = 8593
11 changes: 11 additions & 0 deletions devel/p5-Tie-Sub/files/patch-t_11__test__examples.t
@@ -0,0 +1,11 @@
--- t/11_test_examples.t.orig 2012-08-18 22:03:49 UTC
+++ t/11_test_examples.t
@@ -55,7 +55,7 @@ EOT
for my $data (@data) {
my $dir = getcwd();
chdir("$dir/$data->{path}");
- my $result = qx{perl $data->{script} 2>&3};
+ my $result = qx{perl $data->{script} 2>/dev/null };
chdir($dir);
eq_or_diff(
$result,
2 changes: 2 additions & 0 deletions devel/p5-Tie-Sub/pkg-descr
@@ -0,0 +1,2 @@
The module ties the subroutine to a hash. The subroutine is executed
at fetch hash.

0 comments on commit a5d69a4

Please sign in to comment.