Changeset 30657 for lang/perl/POE-Component-RemoteTail/branches
- Timestamp:
- 03/01/09 23:44:02 (4 years ago)
- Location:
- lang/perl/POE-Component-RemoteTail/branches
- Files:
-
- 1 added
- 5 modified
- 1 copied
-
. (added)
-
refactor2 (copied) (copied from lang/perl/POE-Component-RemoteTail/trunk)
-
refactor2/Changes (modified) (1 diff)
-
refactor2/Makefile.PL (modified) (1 diff)
-
refactor2/lib/POE/Component/RemoteTail.pm (modified) (6 diffs)
-
refactor2/lib/POE/Component/RemoteTail/CustomEngine/NetSSHPerl.pm (modified) (2 diffs)
-
refactor2/lib/POE/Component/RemoteTail/Job.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/POE-Component-RemoteTail/branches/refactor2/Changes
r17776 r30657 1 1 Revision history for Perl extension POE::Component::RemoteTail 2 3 0.02001 2009/03/01 4 add some improvement about problems argued in perlmonks 5 6 * http://www.perlmonks.org/?node_id=746039 7 8 - ocrrect a mistake of PoCo::RemoteTail::CustomEngine::NetSSHPerl 9 - error handlings are improved slightly 10 - add some parameters to PoCo::RemoteTail::Job to be albe to use command-line options 2 11 3 12 0.01004 2008/08/16 -
lang/perl/POE-Component-RemoteTail/branches/refactor2/Makefile.PL
r17776 r30657 8 8 requires 'constant'; 9 9 requires 'UNIVERSAL::require'; 10 10 requires 'IO::Pty', 11 11 build_requires 'Test::More'; 12 12 build_requires 'YAML'; -
lang/perl/POE-Component-RemoteTail/branches/refactor2/lib/POE/Component/RemoteTail.pm
r17776 r30657 6 6 use POE::Wheel::Run; 7 7 use POE::Component::RemoteTail::Job; 8 use IO::Pty; 8 9 use Class::Inspector; 9 10 use constant DEBUG => 0; 10 11 use UNIVERSAL::require; 11 12 12 our $VERSION = '0.0 1004';13 our $VERSION = '0.02001'; 13 14 14 15 *debug = DEBUG … … 93 94 my $path = $job->{path}; 94 95 my $user = $job->{user}; 96 my $ssh_options = $job->{ssh_options}; 97 my $add_command = $job->{add_command}; 98 99 my $command = "ssh -A"; 100 $command .= ' ' . $ssh_options if $ssh_options; 101 $command .= " $user\@$host tail -f $path"; 102 $command .= ' ' . $add_command if $add_command; 95 103 96 104 # default Program ( go on a simple unix command ) 97 my %program = ( Program => "ssh -A $user\@$host tail -f $path");105 my %program = ( Program => $command ); 98 106 99 107 # use custom class … … 109 117 my $wheel = POE::Wheel::Run->new( 110 118 %program, 119 Conduit => 'pty-pipe', 111 120 StdioFilter => POE::Filter::Line->new(), 112 121 StdoutEvent => "_got_child_stdout", … … 139 148 my $stderr = $_[ARG0]; 140 149 debug("STDERR:$stderr"); 150 die("got_child_stderr: $stderr"); 141 151 } 142 152 … … 157 167 =head1 SYNOPSIS 158 168 169 use POE; 159 170 use POE::Component::RemoteTail; 160 171 161 my ( $host, $path, $user , $password) = @target_host_info;172 my ( $host, $path, $user ) = @target_host_info; 162 173 my $alias = 'Remote_Tail'; 163 174 … … 170 181 path => $path, 171 182 user => $user, 183 ssh_options => $ssh_options, # see POE::Component::RemoteTail::Job 184 add_command => $add_command, # see POE::Component::RemoteTail::Job 172 185 ); 173 186 -
lang/perl/POE-Component-RemoteTail/branches/refactor2/lib/POE/Component/RemoteTail/CustomEngine/NetSSHPerl.pm
r17776 r30657 1 use POE::Component::RemoteTail::CustomEngine::NetSSHPerl;1 package POE::Component::RemoteTail::CustomEngine::NetSSHPerl; 2 2 3 3 use strict; 4 4 use warnings; 5 5 use Net::SSH::Perl; 6 7 sub new { 8 my $class = shift; 9 my $self = bless {@_}, $class; 10 return $self; 11 } 6 12 7 13 sub process_entry { … … 75 81 =head1 METHOD 76 82 83 =head2 new() 84 77 85 =head2 process_entry() 78 86 -
lang/perl/POE-Component-RemoteTail/branches/refactor2/lib/POE/Component/RemoteTail/Job.pm
r17776 r30657 19 19 =head1 SYNOPSIS 20 20 21 my $job = $tailer->job( 22 host => '127.0.0.1', 23 path => '/home/httpd/logs/access_log', 24 user => 'admin', 25 ssh_options => '-i ~/.ssh/identity', 26 add_command => '| grep hoge', 27 ); 28 29 # $job would be transformed as below. 30 # ssh -i ~/.ssh/identity -A 127.0.0.1 tail -f /home/httpd/access_log | grep hoge 31 21 32 =head1 DESCRIPTION 22 33
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)