Rocco-

Will POE::Component::RemoteTail automatically use() it for you?

I think so, here's a code excerpt from RemoteTail.pm:

102 # use custom class 103 if ( my $class = $job->{process_class} ) { 104 $class->require or die(@!); 105 $class->new(); 106 %program = ( Program => sub { $class->process_entry($j +ob) }, ); 107 }
Also, I added a print statement to the beginning of the NetSSHPerl module, and I saw the print output before the error message came out.

I'm also confused because I don't understand the meat of the RemoteTail::CustomEngine::NetSSHPerl module:

use POE::Component::RemoteTail::CustomEngine::NetSSHPerl; use strict; use warnings; use Net::SSH::Perl; print STDERR "In NetSSHPerl...\n"; #Added by cmv sub process_entry { my $self = shift; my $arg = shift; my $host = $arg->{host}; my $path = $arg->{path}; my $user = $arg->{user}; my $password = $arg->{password}; my $cmd = "tail -f $path"; my $ssh = Net::SSH::Perl->new( $host, protocol => "2,1" ); $ssh->login($user); $ssh->register_handler( "stdout", sub { my ( $channel, $buffer ) = @_; my $log = $buffer->bytes; print $log; unless ($log) { exit; } } ); my ( $stdout, $stderr, $exit ) = $ssh->cmd($cmd); } 1;
Why does it have a use statement pointing to itself?
Shouldn't it have a module declaration instead?

I'm confused.


In reply to Re^2: POE::Component::RemoteTail - Can't locate object method new by cmv
in thread POE::Component::RemoteTail - Can't locate object method new by cmv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.