NAME

POE::Component::RemoteTail -

SYNOPSIS

use POE::Component::RemoteTail;

my ( $host, $path, $user, $password ) = @target_host_info;
my $alias = 'Remote_Tail';

# spawn component
POE::Component::RemoteTail->spawn( alias => $alias );

# prepare the postback subroutine at main POE session
POE::Session->create(
    inline_states => {
        _start => sub {
            my ( $kernel, $session ) = @_[ KERNEL, SESSION ];

            # create job
            my $job = POE::Component::RemoteTail->job(
                host          => $host,
                path          => $path,
                user          => $user,
                password      => $password,
                process_class => "POE::Component::RemoteTail::Engine::Default",
            );

            # post to execute
            $kernel->post( $alias,
                "execute" => { postback => "mypostback", job => $job } );
        },

        # return to here
        mypostback => sub {
            my ( $kernel, $session, $data ) = @_[ KERNEL, SESSION, ARG1 ];
            my $host = $data->[0];
            my $log  = $data->[1];
            ... do something ...
        },
    },
);

POE::Kernel->run();

DESCRIPTION

POE::Component::RemoteTail is

METHOD

spawn()

job()

execute()

stop_tail()

debug()

new()

AUTHOR

Takeshi Miki <miki@cpan.org>

LICENSE

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

SEE ALSO