root/lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Input/Stdin.pm @ 18806

Revision 18806, 330 bytes (checked in by lopnor, 5 years ago)

lang/perl/App-Hachero: first import

  • Property svn:executable set to *
Line 
1package App::Hachero::Plugin::Input::Stdin;
2use strict;
3use warnings;
4use base qw(App::Hachero::Plugin::Base);
5
6sub init {
7    my ($self, $context) = @_;
8    $self->{fh} = *STDIN;
9}
10
11sub input : Hook {
12    my ($self, $context, $args) = @_;
13    my $fh = $self->{fh};
14    my $line = <$fh>;
15    $context->currentline( $line );
16}
17
181;
Note: See TracBrowser for help on using the browser.