PkgForge::SourceUtils - Utilities to help with source module handling
This documentation refers to PkgForge::SourceUtils version 1.4.8
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(); }
This module provides a set of utilities which are commonly useful to handling source packages with PkgForge::Source modules.
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
SRPM
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.
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.
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.
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.
RPM
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.
new()
This module requires Module::Find, Readonly and UNIVERSAL::require.
PkgForge, PkgForge::Source, PkgForge::Source::SRPM, PkgForge::Builder
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.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
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.