NAME
Tie::Handle::TailSwitch - Tie to Logfile::Tail::Switch
VERSION
This document describes version 0.001 of Tie::Handle::TailSwitch (from Perl distribution Tie-Handle-TailSwitch), released on 2017-06-09.
SYNOPSIS
use Time::HiRes 'sleep'; # for subsecond sleep
use Tie::Handle::TailSwitch;
tie *FH, 'Tie::Handle::TailSwitch',
globs => ['/var/log/http_*', '/var/log/https_*'],
# other Logfile::Tail::Switch options;
while (1) {
my $line = <FH>;
if (length $line) {
print $line;
} else {
sleep 0.1;
}
}
DESCRIPTION
This module ties a filehandle to Logfile::Tail::Switch object.
METHODS
TIEHANDLE classname, LIST
Tie this package to file handle. LIST
will be passed to Logfile::Tail::Switch's constructor.
READLINE this
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Tie-Handle-TailSwitch.
SOURCE
Source repository is at https://github.com/perlancar/perl-Tie-Handle-TailSwitch.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Tie-Handle-TailSwitch
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.