ports/152408: New port: devel/MooseX-Attribute-ENV Set default of an attribute to a value from %ENV
Alan Snelson
Alan at Wave2.org
Fri Nov 19 14:30:11 UTC 2010
>Number: 152408
>Category: ports
>Synopsis: New port: devel/MooseX-Attribute-ENV Set default of an attribute to a value from %ENV
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 19 14:30:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Alan Snelson
>Release: 8.0-RELEASE
>Organization:
Wave2 Limited
>Environment:
>Description:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# p5-MooseX-Attribute-ENV
# p5-MooseX-Attribute-ENV/distinfo
# p5-MooseX-Attribute-ENV/Makefile
# p5-MooseX-Attribute-ENV/pkg-descr
# p5-MooseX-Attribute-ENV/pkg-plist
#
echo c - p5-MooseX-Attribute-ENV
mkdir -p p5-MooseX-Attribute-ENV > /dev/null 2>&1
echo x - p5-MooseX-Attribute-ENV/distinfo
sed 's/^X//' >p5-MooseX-Attribute-ENV/distinfo << 'c66dd760cb525c2192acc6afb900ad07'
XSHA256 (MooseX-Attribute-ENV-0.01.tar.gz) = 15a51a4b140ad0f3e38855f892a210da0b8694a6bcffaab99a0e6942168525f5
XSIZE (MooseX-Attribute-ENV-0.01.tar.gz) = 21670
c66dd760cb525c2192acc6afb900ad07
echo x - p5-MooseX-Attribute-ENV/Makefile
sed 's/^X//' >p5-MooseX-Attribute-ENV/Makefile << '6ac0cb807bb11b17c32f5805c136c3b8'
X# New ports collection makefile for: p5-MooseX-Attribute-ENV
X# Date created: 18 November 2010
X# Whom: alan
X#
X# $FreeBSD$
X#
X
XPORTNAME= MooseX-Attribute-ENV
XPORTVERSION= 0.01
XCATEGORIES= devel perl5
XMASTER_SITES= CPAN
XPKGNAMEPREFIX= p5-
X
XMAINTAINER= Alan at Wave2.org
XCOMMENT= Set default of an attribute to a value from %ENV
X
XRUN_DEPENDS= p5-Moose>=1.19:${PORTSDIR}/devel/p5-Moose
X
XPERL_CONFIGURE= 5.8.8+
X
XMAN3= MooseX::Attribute::ENV.3
X
X.include <bsd.port.mk>
6ac0cb807bb11b17c32f5805c136c3b8
echo x - p5-MooseX-Attribute-ENV/pkg-descr
sed 's/^X//' >p5-MooseX-Attribute-ENV/pkg-descr << 'b5f1ec5ebc0f3037876ddffeac39db92'
XThis is a Moose attribute trait that you use when you want the default
Xvalue for an attribute to be populated from the %ENV hash.
X
XSo, for example if you have set the environment variable
XUSERNAME = 'John' you can do:
X
X package MyApp::MyClass;
X
X use Moose;
X use MooseX::Attribute::ENV;
X
X has 'username' => (is=>'ro', traits=>['ENV']);
X
X package main;
X
X my $myclass = MyApp::MyClass->new();
X
X print $myclass->username; # STDOUT => 'John';
X
XWWW: http://search.cpan.org/dist/MooseX-Attribute-ENV/
b5f1ec5ebc0f3037876ddffeac39db92
echo x - p5-MooseX-Attribute-ENV/pkg-plist
sed 's/^X//' >p5-MooseX-Attribute-ENV/pkg-plist << 'e2f869a4e87c342fd6cff6b7d61138a3'
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/MooseX/Attribute/ENV/.packlist
X%%SITE_PERL%%/MooseX/Attribute/ENV.pm
X at dirrmtry %%SITE_PERL%%/MooseX/Attribute
X at dirrmtry %%SITE_PERL%%/MooseX
X at dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/MooseX/Attribute/ENV
X at dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/MooseX
e2f869a4e87c342fd6cff6b7d61138a3
exit
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list