NAME

Maximus::Role::Module::Source - Interface for module source handlers

SYNOPSIS

package Maximus::Class::Module::Source::SCM::Foo;
use Moose;

with 'Maximus::Role::Module::Source';

DESCRIPTION

This is the interface for all Maximus::Class::Module::Source classes

ATTRIBUTES

version

Version of module this source represents

meta_data

Module meta_data, such as its license and author(s)

validated

Returns true if validate succeeded.

tmpDir

Retrieve path to temporary directory for file storage. This directory wil be automatically cleaned up.

processDir

Another temporary directory to which the module files will be copied. This will allow for module uploads that contain a full modscope. Either through SCM or a ZIP Archive. This is done to make sure we'll only archive the intended module.

METHODS

prepare

Prepare contents of temporarily directory to validate against the validate method of Maximus::Class::Module::Source::Base

validate($module)

Validate directory structure and its contents to see if it can be archived. $module ISA Maximus::Class::Module

findDependencies($module)

Analyze BlitzMax source code to find dependent modules. Returns an array with at each index an array of which the first value is the modscope, and the second the modname. $module ISA Maximus::Class::Module

archive($module, $fh)

Create an archive out of the contents of the temporarily directory $fh should be a IO::Handle or any other derived handle. Returns the name of the archive on success.

findAndMoveRootDir($module)

Find the location of the mainfile and move the contents of this directory to the root of the temporary directory. After that it cleans out SCM specific directories.

DEMOLISH

Moose deconstructor. Makes sure the temporary directories are cleaned up.

AUTHOR

Christiaan Kras

LICENSE

Copyright (c) 2010-2013 Christiaan Kras

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.