| App-CPAN2Pkg documentation | Contained in the App-CPAN2Pkg distribution. |
App::CPAN2Pkg::Module - poe session to drive a module packaging
version 2.111781
App::CPAN2Pkg::Module implements a class describing a module to be
built, with its prereqs and their availability.
The name of the Perl module, eg App::CPAN2Pkg.
The App::CPAN2Pkg::Repository for the local system.
The App::CPAN2Pkg::Repository for the upstream Linux distribution.
The modules listed as prerequesites for the module. Note that each repository (local & upstream) keep in addition a list of prereqs that are missing. This list keeps the module prereqs, even after they have been fulfilled on the repositories.
$module->add_prereq( $modname );
Add a prerequesite to the module, also list it as missing on both local & upstream repositories.
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.
| App-CPAN2Pkg documentation | Contained in the App-CPAN2Pkg distribution. |
# # This file is part of App-CPAN2Pkg # # 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. # use 5.010; use strict; use warnings; package App::CPAN2Pkg::Module; BEGIN { $App::CPAN2Pkg::Module::VERSION = '2.111781'; } # ABSTRACT: poe session to drive a module packaging use Moose; use MooseX::Has::Sugar; use MooseX::SemiAffordanceAccessor; use App::CPAN2Pkg::Repository; use App::CPAN2Pkg::Types; # -- public attributes has name => ( ro, required, isa=>'Str' ); has local => ( ro, isa=>"App::CPAN2Pkg::Repository", default=>sub{ App::CPAN2Pkg::Repository->new } ); has upstream => ( ro, isa=>"App::CPAN2Pkg::Repository", default=>sub{ App::CPAN2Pkg::Repository->new } ); has prereqs => ( ro, auto_deref, isa => 'ArrayRef[Str]', traits => ['Array'], default => sub { [] }, handles => { _add_prereq => 'push', }, ); # -- public methods sub add_prereq { my ($self, $p) = @_; $self->_add_prereq($p); $self->local->add_prereq($p); $self->upstream->add_prereq($p); } 1;
__END__