The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

    PkgForge::Types - Moose types for the LCFG Package Forge

VERSION

    This documentation refers to PkgForge::Types version 1.4.8

SYNOPSIS

    use PkgForge::Types qw(AbsolutePathDirectory);

    has 'directory' => (
       is       => 'rw',
       isa      => AbsolutePathDirectory,
       coerce   => 1,
       required => 1,
       default  => sub { File::Spec->curdir() },
    );

DESCRIPTION

This module provides various useful Moose types and associated coercions that are needed in the LCFG Package Forge suite.

TYPES

AbsolutePath

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.

AbsolutePathDirectory

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.

EmailAddress

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.

EmailAddressList

This list type is based on the Moose ArrayRef type with the requirement that all elements are of the EmailAddress type.

UserName

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.

UID

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.

Octal

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.

NoCommas

This type is based on the Moose string type (Str) which requires that the string does not contain any commas.

PkgForgeList

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.

SUBROUTINES/METHODS

This module does not provide any subroutines or methods.

DEPENDENCIES

This module is Moose powered and uses MooseX::Types. It also requires Email::Address and Email::Valid.

SEE ALSO

PkgForge

PLATFORMS

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

BUGS AND LIMITATIONS

Please report any bugs or problems (or praise!) to bugs@lcfg.org, feedback and patches are also always very welcome.

AUTHOR

    Stephen Quinney <squinney@inf.ed.ac.uk>

LICENSE AND COPYRIGHT

    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.