PkgForge::Types - Moose types for the LCFG Package Forge
This documentation refers to PkgForge::Types version 1.4.8
use PkgForge::Types qw(AbsolutePathDirectory); has 'directory' => ( is => 'rw', isa => AbsolutePathDirectory, coerce => 1, required => 1, default => sub { File::Spec->curdir() }, );
This module provides various useful Moose types and associated coercions that are needed in the LCFG Package Forge suite.
A type based on the Moose string type (Str) which requires it to be an absolute path. There is an associated coercion which can be used to promote a relative path to an absolute path.
A type based on the AbsolutePath type which also requires it to be a directory. Again there is an associated coercion to promote a relative path to absolute.
A type based on the Moose string type (Str) which requires it to be a valid email address. The Email::Valid module is required to do the validation.
This list type is based on the Moose ArrayRef type with the requirement that all elements are of the EmailAddress type.
EmailAddress
This is a string type which represents a user name. Anything which is NOT just a sequence of digits (i.e. looks like a UID) will be allowed. If a UID is passed in it will be passed through the getpwuid function to retrieve the associated username.
getpwuid
This is an integer type which represents a user ID (UID). Anything which is not an integer will be passed through the getpwnam function to retrieve the associated UID.
getpwnam
This is a string type which represents an octal number. It expects the string to start with a zero followed by a sequence of digits. This is aimed at attributes which represent Unix file permission modes.
This type is based on the Moose string type (Str) which requires that the string does not contain any commas.
This type is based on the Moose ArrayRef type with the requirement that each element is of the NoCommas type. The interesting aspect of this type is the associated coercions from Str and ArrayRef types. When coercing from a string it will be split on commas and the resulting list will be used. When coercing from a list each element will be passed through the same string coercion to split on commas.
NoCommas
This module does not provide any subroutines or methods.
This module is Moose powered and uses MooseX::Types. It also requires Email::Address and Email::Valid.
PkgForge
This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.
ScientificLinux5, Fedora13
Please report any bugs or problems (or praise!) to bugs@lcfg.org, feedback and patches are also always very welcome.
Stephen Quinney <squinney@inf.ed.ac.uk>
Copyright (C) 2010-2011 University of Edinburgh. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.
To install PkgForge::App, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PkgForge::App
CPAN shell
perl -MCPAN -e shell install PkgForge::App
For more information on module installation, please visit the detailed CPAN module installation guide.