App::CPAN2Pkg::Worker - poe session to drive a module packaging
version 2.111781
App::CPAN2Pkg::Worker implements a POE session driving the whole packaging process of a given module. It has different subclasses, used to match the diversity of Linux distributions.
App::CPAN2Pkg::Worker
It is spawned by App::CPAN2Pkg::Controller and uses a App::CPAN2Pkg::Module object to track module information.
App::CPAN2Pkg::Controller
App::CPAN2Pkg::Module
A boolean to state whether CPANPLUS has been initialized with new index.
A lock (App::CPAN2Pkg::Lock object) to prevent more than one cpanplus initialization at a time.
The name of the module to build / install / submit / whatever.
my $backend = $worker->cpan2dist_flavour;
Return the cpanplus backend (CPANPLUS::Dist::*) to be used by the worker when running cpan2dist.
CPANPLUS::Dist::*
cpan2dist
$worker->run_command( $command, $event );
Run a $command in another process, and takes care of everything. Since it uses POE::Wheel::Run underneath, it understands various stuff such as running a code reference. Note: commands will be launched under a C locale.
$command
C
Upon completion, yields back an $event with the result status and the command output.
$event
check_upstream_availability( )
Check if module is available in the distribution repositories.
check_local_availability( )
Check if the module is installed locally.
install_from_upstream( )
Install module from distribution repository.
cpanplus_initialize( $event )
Run CPANPLUS initialization (reload index, etc). Fire $event when finished, or if this has already been done. Wait 10 seconds before retrying if initialization is currently ongoing.
cpanplus_find_prereqs( )
Run CPANPLUS to find the module prereqs.
local_prereqs_wait( )
Request to wait for local prereqs to be all present before attempting to build the module locally.
local_prereqs_available( $modname )
Inform the worker that $modname is now available locally. This may unblock the worker from waiting if all the needed modules are present.
$modname
cpanplus_create_package( )
Try to create a native package for the module using cpan2dist.
local_install_from_package( )
Install the native package generated previously by cpan2dist.
upstream_import_package( )
Import the package in upstream repository.
upstream_prereqs_wait( )
Request to wait for upstream prereqs to be all present before attempting to build the module locally.
upstream_prereqs_available( $modname )
Inform the worker that $modname is now available upstream. This may unblock the worker from waiting if all the needed modules are present.
upstream_build_package( )
Request package to be built on upstream build system.
Jerome Quelin <jquelin@gmail.com>
This software is copyright (c) 2009 by Jerome Quelin.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::CPAN2Pkg, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::CPAN2Pkg
CPAN shell
perl -MCPAN -e shell install App::CPAN2Pkg
For more information on module installation, please visit the detailed CPAN module installation guide.