Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Perl
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/File/Tail
t
.gitignore
.travis.yml
Build.PL
Changes
LICENSE
META.json
README.md
cpanfile
minil.toml

README.md

NAME

File::Tail::Inotify2 - Simple interface to tail a file using inotify.

SYNOPSIS

use File::Tail::Inotify2;
my $watcher = File::Tail::Inotify2->new(
    file    => $filename,
    on_read => sub {
        my $line = shift;
        print $line;
    }
);
$watcher->poll;

DESCRIPTION

Yet another module to tail a file. Even if the file are renamed by logrotate(8), this module tail a new file created by logrotate(8).

WARNINGS

This module works on Linux. Other OS are not supported.

METHOD

  • $watcher = File::Tail::Inotify2->new( file => $filename, on_read => $cb->($read_line) )

    Returns a File::Tail::Inotify2 object. If $filename is modified, $cb->($read_line) is called per line.

  • $watcher->poll

    Starts watching a file and will never exit.

SEE ALSO

Linux::Inotify2, File::Tail, File::SmartTail, Tail::Tool

AUTHOR

Yoshihiro Sasaki,

COPYRIGHT AND LICENSE

Copyright (C) 2012 by Yoshihiro Sasaki

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.

Something went wrong with that request. Please try again.