View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Stephen Quinney > PkgForge-Server > PkgForge::Handler



Annotate this POD

View/Report Bugs
Module Version: v1.1.10   Source  


PkgForge::Handler - A Moose class to be used by PkgForge handlers.


     This documentation refers to PkgForge::Handler version 1.1.10


     package PkgForge::Handler::Foo;

     use Moose;

     extends 'PkgForge::Handler';

     sub execute { }


This is a Moose class which pulls together all the common aspects of Package Forge handlers. A handler is a class which does a specific job, for example: accepting incoming jobs or firing off builds of accepted jobs. This class requires that the sub-class implements a method named execute which actually does the work.


The following attributes will be part of any class which inherits from this class:


This is inherited from MooseX::ConfigFromFile (via PkgForge::ConfigFile), if specified it can be used to initialise the class via the new_with_config method. It can be a string or a list of strings, each file should be a YAML file, see PkgForge::ConfigFile for details.


A boolean value to control whether or not debugging messages are logged. The default is false. Note that when using a logging configuration file it is better to control the minimum log level through that file.


The directory into which incoming package forge jobs will be submitted. The default is /var/lib/pkgforge/incoming


The directory into which package forge jobs will be transferred if they are accepted as valid. The default is /var/lib/pkgforge/accepted


The directory into which the results of finished package forge jobs will be stored. The default is /var/lib/pkgforge/results.


The directory into which log files will be stored by default. The default path is /var/log/pkgforge. This attribute does not currently have any direct effect on where the log files are stored. It is solely provided so that the server initialisation script can ensure that the correct directory exists.


The configuration file for the logging system. The default value is /etc/pkgforge/log-default.cfg. If this is not specified (i.e. set to undef) or does not exist then all messages will be logged directly to stderr. For servers that is almost certainly not what you want. See Log::Dispatch::Configurator::AppConfig for details of the configuration file format.


This is the configuration for Log::Dispatch, see that module for documentation. Also See MooseX::LogDispatch. You normally control this via the configuration file specified in the logconf attribute.


This is a reference to the logger object, you can call methods such as debug and error on this object to log messages. See Log::Dispatch and Log::Dispatch::Config for full details.


A class which inherits from this class will have the following methods. This class also requires that the sub-class implements a method named execute which actually does the work.


Create a new instance of the class. Optionally set some attributes by passing a hash as usual.


Create a new instance of the class with attributes set by either entries in the configuration file or the usual hash. See MooseX::ConfigFromFile for details.

log_problem( $msg, $error_string )

The logger we are using has a tendency to eat the contents of the $EVAL_ERROR|$@ variable when it is called. This can make formatting error messages quite tricky. If you want your handler to print a message on one line and then add any message that might be in $EVAL_ERROR on a following line then use this method. Underneath it will use the error method of the logger.


By default Package Forge handlers can be configured via the YAML file /etc/pkgforge/handlers.yml This can be overridden by any handler class so also see the documentation for the specific class.

By default, the logging system can be configured via /etc/pkgforge/default.log. If the file does not exist then the handler will log to stderr.


This module is powered by Moose and uses MooseX::ConfigFromFile, MooseX::LogDispatch and MooseX::Types.




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, feedback and patches are also always very welcome.


    Stephen Quinney <>


    Copyright (C) 201O 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.

syntax highlighting: