Max Kanat-Alexander > VCI-0.3.1 > VCI::Util

Download:
VCI-0.3.1.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
Report a bug
Source   Latest Release: VCI-0.5.2

NAME ^

VCI::Util - Types and Utility Functions used by VCI

DESCRIPTION ^

This contains mostly subtypes used by accessors in various VCI modules.

TYPES ^

Arrays

All of these are extensions of the ArrayRef type from Moose::Util::TypeConstraints.

ArrayOfChanges

An arrayref that can only contain Text::Diff::Parser::Change objects.

ArrayOfCommits

An arrayref that can only contain VCI::Abstract::Commit objects.

ArrayOfCommittables

An arrayref that can only contain objects that implement VCI::Abstract::Committable.

ArrayOfContainers

An arrayref that can only contain objects that implement VCI::Abstract::FileContainer.

ArrayOfProjects

An arrayref that can only contain VCI::Abstract::Project objects.

Objects

DateTime

A DateTime object.

If you pass in a number for this argument, it will be interpreted as a Unix epoch (seconds since January 1, 1970) and converted to a DateTime object using "from_epoch" in DateTime.

If you pass in a string that's not just an integer, it will be parsed by DateTime::Format::DateParse. (Note: If you don't specify a time zone in your string, it will be assumed your time is in the local time zone.)

Path

A Path::Abstract object.

If you pass a string for this argument, it will be converted using "new" in Path::Abstract. This means that paths are always Unix paths--the path separator is always /. \path\to\file will not work.

After processing, the path will never start with / and never end with /. (In other words, it will always be a relative path and never end with /.)

If you pass the root path (/) you will get an empty path.