1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

Sub::Override allows the programmer to simply name the sub to replace

and to supply a sub to replace it with.

WWW: http://search.cpan.org/dist/Sub-Override/

PR:		75804
Submitted by:	Lars Eggert <lars.eggert at gmx.net>
This commit is contained in:
Yen-Ming Lee 2005-02-10 06:08:53 +00:00
parent ce9c41c5c8
commit 6923ce6e93
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=128445
5 changed files with 52 additions and 0 deletions

View File

@ -1028,6 +1028,7 @@
SUBDIR += p5-String-Random
SUBDIR += p5-String-RexxParse
SUBDIR += p5-String-Similarity
SUBDIR += p5-Sub-Override
SUBDIR += p5-Sub-Uplevel
SUBDIR += p5-Sys-Mmap
SUBDIR += p5-System2

View File

@ -0,0 +1,34 @@
# New ports collection makefile for: p5-Sub-Override
# Date created: January 4th 2005
# Whom: Lars Eggert <lars.eggert@gmx.net>
#
# $FreeBSD$
#
PORTNAME= Sub-Override
PORTVERSION= 0.06
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Sub
PKGNAMEPREFIX= p5-
MAINTAINER= lars.eggert@gmx.net
COMMENT= Perl extension for easily overriding subroutines
BUILD_DEPENDS= ${SITE_PERL}/Test/Exception.pm:${PORTSDIR}/devel/p5-Test-Exception
RUN_DEPENDS= ${BUILD_DEPENDS}
PERL_CONFIGURE= yes
MAN3= Sub::Override.3
.include <bsd.port.pre.mk>
##
## this port requires PERL 5.6.x or later
##
.if ${PERL_LEVEL} < 500600
IGNORE= Port requires perl 5.6.x or later. Install lang/perl5 then try again
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,2 @@
MD5 (Sub-Override-0.06.tar.gz) = b6827d2ca484318ac5d5bd1820deb5ed
SIZE (Sub-Override-0.06.tar.gz) = 4762

View File

@ -0,0 +1,10 @@
Sub::Override allows the programmer to simply name the sub to replace
and to supply a sub to replace it with.
my $override = Sub::Override->new('Some::sub', sub {'new data'});
# which is equivalent to:
my $override = Sub::Override->new;
$override->replace('Some::sub', sub { 'new data' });
WWW: http://search.cpan.org/dist/Sub-Override/

View File

@ -0,0 +1,5 @@
%%SITE_PERL%%/Sub/Override.pm
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Sub/Override/.packlist
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Sub/Override
@unexec rmdir %D/%%SITE_PERL%%/mach/auto/Sub 2>/dev/null || true
@unexec rmdir %D/%%SITE_PERL%%/Sub 2>/dev/null || true