CPANPLUS::Daemon - Remote CPANPLUS access


CPANPLUS-Daemon documentation  | view source Contained in the CPANPLUS-Daemon distribution.

Index


NAME

Top

CPANPLUS::Daemon -- Remote CPANPLUS access

SYNOPSIS

Top

    ### 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

Top

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

Top

$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

Top

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

COPYRIGHT

Top


CPANPLUS-Daemon documentation  | view source Contained in the CPANPLUS-Daemon distribution.