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

NAME

PkgForge::SourceUtils - Utilities to help with source module handling

VERSION

This documentation refers to PkgForge::SourceUtils version 1.4.8

SYNOPSIS

    use PkgForge::SourceUtils;

    my @modules = PkgForge::SourceUtils::list_handlers();

    my $module = PkgForge::SourceUtils::find_handler($file);

    if ( defined $module ) {
       my $pkg = $module->new( ... );
       $pkg->validate();
    }

DESCRIPTION

This module provides a set of utilities which are commonly useful to handling source packages with PkgForge::Source modules.

SUBROUTINES/METHODS

list_source_types

This lists the types of source packages which are supported. It does this by using a similar approach to list_handlers except it returns the short name rather than the full module name. For example, PkgForge::Source::SRPM has a type of SRPM.

list_handlers

This lists all available source package handler modules. You will get a sorted list of the names of all modules under the PkgForge::Source base.

load_source_handler($type)

This takes the type of a source package and attempts to find the associated module in the PkgForge::Source namespace. This will die if the type is not a valid module name or the module cannot be loaded.

find_handler($file)

This will attempt to find a suitable source package handler for a given file. For example, an SRPM might be handled by PkgForge::Source::SRPM. If none is found then undef will be returned. Note that if the source package type is supported by multiple modules then the first to be found wins.

list_builder_types()

This lists all the available types of source package builder modules. Effectively, you will get a sorted list of the short names of all modules under the PkgForge::Builder base. For example, the module PkgForge::Builder::RPM will have a type of RPM.

find_builder($type)

Finds and loads the specified type of source package builder module. Returns a string containing the name of the module which can be used to call the new() method.

DEPENDENCIES

This module requires Module::Find, Readonly and UNIVERSAL::require.

SEE ALSO

PkgForge, PkgForge::Source, PkgForge::Source::SRPM, PkgForge::Builder

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.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 269:

You forgot a '=back' before '=head1'