The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CPANPLUS::Daemon -- Remote CPANPLUS access

SYNOPSIS

    ### from the command line
    cpanpd -p secret                        # using defaults
    cpanpd -P 666 -u my_user -p secret      # options provided, recommended

    ### using the API
    use CPANPLUS::Daemon;
    $daemon = CPANPLUS::Daemon->new(
                            username    => 'my_user',
                            password    => 'secret',
                            port        => 666,
                        );
    $daemon->run;
    
    ### (dis)connecting to the daemon, from the default shell
    CPAN Terminal> /connect --user=my_user --pass=secret localhost 666
    ...
    CPAN Terminal> /disconnect
    

DESCRIPTION

CPANPLUS::Daemon let's you run a daemon that listens on a specified port and can act as a remote backend to your CPANPLUS::Shell::Default.

You can use the CPANPLUS::Shell::Default shell to connect to the daemon. Note that both sides (ie, both the server and the client) ideally should run the same version of the CPANPLUS::Shell::Default, to ensure maximum compatibillity

See the CPANPLUS::Shell::Default documentation on how to connect to a remote daemon.

METHODS

$daemon = CPANPLUS::Daemon->new(password => $pass, [username => $user, port => $port]);

Creates a new CPANPLUS::Daemon object, based on the following paremeters:

password (required)

The password needed to connect to this server instance

username (optional)

The user needed to connect to this server instance. Defaults to cpanpd.

port

The port number this server instance will listen on. Defaults to 1337.

$daemon->run( [stdout => \*OUT, stderr => \*ERR] );

This actually makes the daemon active. Note that from here on, you lose control of the program, and it is handed to the daemon. You can now only exit the program via a SIGINT or another way that terminates the process.

You can override where the daemon sends its output by supplying the an alternate filehandle via the stdout and stderr parameter

AUTHOR

This module by Jos Boumans <kane@cpan.org>.

COPYRIGHT

This module is copyright (c) 2005 Jos Boumans <kane@cpan.org>. All rights reserved.

This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.