pod update
[app-cpan2pkg.git] / lib / App / CPAN2Pkg.pm
blob9a0cc85af87b40024bfa8a1a5fa7a365b0569c62
2 # This file is part of App::CPAN2Pkg.
3 # Copyright (c) 2009 Jerome Quelin, all rights reserved.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the same terms as Perl itself.
10 package App::CPAN2Pkg;
12 use strict;
13 use warnings;
15 use POE;
17 our $VERSION = '0.0.1';
19 sub spawn {
20 my ($class, $opts) = @_;
22 my $session = POE::Session->create(
23 inline_states => {
24 _start => \&_start,
25 _stop => sub { warn "stop"; },
27 args => $opts,
29 return $session->ID;
34 # status:
35 # - computing dependencies
36 # - installing dependencies
37 # - check cooker availability
38 # - cpan2dist
39 # - install local
40 # - check local availability
41 # - mdvsys import
42 # - mdvsys submit
43 # - wait for kenobi build
46 sub _start {
47 my ($k,$opts) = @_[KERNEL, ARG0];
48 $k->alias_set('app');
49 my $modules = $opts->{modules};
50 warn "$_\n" for @$modules;
53 sub _stop {
54 warn "_stop";
58 __END__
60 =head1 NAME
62 App::CPAN2Pkg - generating native linux packages from cpan
66 =head1 SYNOPSIS
68 $ cpan2pkg
69 $ cpan2pkg Module::Foo Module::Bar ...
73 =head1 DESCRIPTION
75 Don't use this module directly, refer to the C<cpan2pkg> script instead.
77 C<App::CPAN2Pkg> is the controller for the C<cpan2pkg> application. It
78 implements a POE session, responsible to schedule and advance module
79 packagement.
81 It is spawned by the poe session responsible for the user interface.
85 =head1 PUBLIC PACKAGE METHODS
87 =head2 my $id = App::CPAN2Pkg->spawn( \%params )
89 This method will create a POE session responsible for coordinating the
90 package(s) creation.
92 It will return the POE id of the session newly created.
94 You can tune the session by passing some arguments as a hash
95 reference, where the hash keys are:
97 =over 4
99 =item * modules => \@list_of_modules
101 A list of modules to start packaging.
104 =back
108 =head1 BUGS
110 Please report any bugs or feature requests to C<app-cpan2pkg at
111 rt.cpan.org>, or through the web interface at
112 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-CPAN2Pkg>. I will
113 be notified, and then you'll automatically be notified of progress on
114 your bug as I make changes.
118 =head1 SEE ALSO
120 Our git repository is located at L<git://repo.or.cz/app-cpan2pkg.git>,
121 and can be browsed at L<http://repo.or.cz/w/app-cpan2pkg.git>.
124 You can also look for information on this module at:
126 =over 4
128 =item * AnnoCPAN: Annotated CPAN documentation
130 L<http://annocpan.org/dist/App-CPAN2Pkg>
132 =item * CPAN Ratings
134 L<http://cpanratings.perl.org/d/App-CPAN2Pkg>
136 =item * Open bugs
138 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-CPAN2Pkg>
140 =back
144 =head1 AUTHOR
146 Jerome Quelin, C<< <jquelin@cpan.org> >>
150 =head1 COPYRIGHT & LICENSE
152 Copyright (c) 2009 Jerome Quelin, all rights reserved.
154 This program is free software; you can redistribute it and/or modify
155 it under the same terms as Perl itself.
157 =cut