Sub::Alias does a compile-time code injection to let you define subroutine

aliases based on its name.

This differs from p5-Sub-Name in that it defines a typeglob in a more correct
way and keeps you from manipulating the symbols table directly. You can use
the subroutine as if it was defined the ordinary way then.

This is particularly useful in the cases when you need to have several
identical subroutines with different names.

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

PR:		ports/157632
Submitted by:	Peter Vereshagin <peter@vereshagin.org>
This commit is contained in:
Frederic Culot 2011-06-06 17:25:52 +00:00
parent c1ccf1496d
commit dbf9a74fe7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=275143
5 changed files with 49 additions and 0 deletions

View File

@ -2257,6 +2257,7 @@
SUBDIR += p5-String-Random
SUBDIR += p5-String-RexxParse
SUBDIR += p5-String-Similarity
SUBDIR += p5-Sub-Alias
SUBDIR += p5-Sub-Current
SUBDIR += p5-Sub-Delete
SUBDIR += p5-Sub-Exporter

View File

@ -0,0 +1,30 @@
# New ports collection makefile for: devel/p5-Sub-Alias
# Date created: 2011-06-06
# Whom: Peter Vereshagin <peter@vereshagin.org>
#
# $FreeBSD$
#
PORTNAME= Sub-Alias
PORTVERSION= 0.03
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= peter@vereshagin.org
COMMENT= Simple subroutine alias
BUILD_DEPENDS= p5-Sub-Exporter>=0:${PORTSDIR}/devel/p5-Sub-Exporter \
p5-Devel-Declare>=0:${PORTSDIR}/devel/p5-Devel-Declare \
p5-Devel-BeginLift>=0:${PORTSDIR}/devel/p5-Devel-BeginLift
RUN_DEPENDS= p5-Sub-Exporter>=0:${PORTSDIR}/devel/p5-Sub-Exporter \
p5-Devel-Declare>=0:${PORTSDIR}/devel/p5-Devel-Declare \
p5-Devel-BeginLift>=0:${PORTSDIR}/devel/p5-Devel-BeginLift
PERL_CONFIGURE= 5.8.0+
LICENSE= MIT
MAN3= Sub::Alias.3
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (Sub-Alias-0.03.tar.gz) = 8a408483ddb7d5daefbe3e25ad50b027b08e6af0b089d30bf7f32de83bd629d1
SIZE (Sub-Alias-0.03.tar.gz) = 16333

View File

@ -0,0 +1,11 @@
This module does a compile-time code injection to let you define subroutine
aliases based on its name.
This differs from p5-Sub-Name in that it defines a typeglob in a more correct
way and keeps you from manipulating the symbols table directly. You can use
the subroutine as if it was defined the ordinary way then.
This is particularly useful in the cases when you need to have several
identical subroutines with different names.
WWW: http://search.cpan.org/dist/Sub-Alias/

View File

@ -0,0 +1,5 @@
%%SITE_PERL%%/Sub/Alias.pm
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Sub/Alias/.packlist
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Sub/Alias
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Sub
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/Sub