Initial import of p5-autobox version 2.55 in the NetBSD Packages
Collection. The Perl 5 module autobox provides an autobox pragma. It allows methods to be called on integers, floats, strings, arrays, hashes, and code references in exactly the same manner as blessed references. The autoboxing is transparent: boxed values are not blessed into their (user-defined) implementation class (unless the method elects to bestow such a blessing) - they simply use its methods as though they are. The classes (packages) into which the native types are boxed are fully configurable. By default, a method invoked on a non-object is assumed to be defined in a class whose name corresponds to the ref() type of that value - or SCALAR if the value is a non-reference. This mapping can be overriden by passing key/value pairs to the use autobox statement, in which the keys represent native types, and the values their associated classes.
This commit is contained in:
parent
15bb042f15
commit
d2a70b294b
3 changed files with 39 additions and 0 deletions
14
devel/p5-autobox/DESCR
Normal file
14
devel/p5-autobox/DESCR
Normal file
|
@ -0,0 +1,14 @@
|
|||
The Perl 5 module autobox provides an autobox pragma. It allows
|
||||
methods to be called on integers, floats, strings, arrays, hashes,
|
||||
and code references in exactly the same manner as blessed references.
|
||||
The autoboxing is transparent: boxed values are not blessed into
|
||||
their (user-defined) implementation class (unless the method elects
|
||||
to bestow such a blessing) - they simply use its methods as though
|
||||
they are.
|
||||
The classes (packages) into which the native types are boxed are
|
||||
fully configurable. By default, a method invoked on a non-object
|
||||
is assumed to be defined in a class whose name corresponds to the
|
||||
ref() type of that value - or SCALAR if the value is a non-reference.
|
||||
This mapping can be overriden by passing key/value pairs to the use
|
||||
autobox statement, in which the keys represent native types, and
|
||||
the values their associated classes.
|
20
devel/p5-autobox/Makefile
Normal file
20
devel/p5-autobox/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 2009/03/22 14:37:44 seb Exp $
|
||||
#
|
||||
|
||||
DISTNAME= autobox-2.55
|
||||
PKGNAME= p5-${DISTNAME}
|
||||
CATEGORIES= devel perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=../../authors/id/C/CH/CHOCOLATE/}
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= http://search.cpan.org/dist/autobox/
|
||||
COMMENT= Perl 5 module to add methods on native types
|
||||
|
||||
PKG_DESTDIR_SUPPORT= user-destdir
|
||||
|
||||
PERL5_PACKLIST= auto/autobox/.packlist
|
||||
|
||||
DEPENDS+= p5-Scope-Guard>=0.03:../../devel/p5-Scope-Guard
|
||||
|
||||
.include "../../lang/perl5/module.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
5
devel/p5-autobox/distinfo
Normal file
5
devel/p5-autobox/distinfo
Normal file
|
@ -0,0 +1,5 @@
|
|||
$NetBSD: distinfo,v 1.1.1.1 2009/03/22 14:37:44 seb Exp $
|
||||
|
||||
SHA1 (autobox-2.55.tar.gz) = 78fb8b9b8711b1969ab1e4b7b1ee839259c39222
|
||||
RMD160 (autobox-2.55.tar.gz) = 0dda7fc73fd5264d8e3fc188e975201ba39091ad
|
||||
Size (autobox-2.55.tar.gz) = 66395 bytes
|
Loading…
Reference in a new issue