Tie::Handle::TailSwitch - Tie to Logfile::Tail::Switch
This document describes version 0.001 of Tie::Handle::TailSwitch (from Perl distribution Tie-Handle-TailSwitch), released on 2017-06-09.
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; } }
This module ties a filehandle to Logfile::Tail::Switch object.
Tie this package to file handle. LIST will be passed to Logfile::Tail::Switch's constructor.
LIST
Please visit the project's homepage at https://metacpan.org/release/Tie-Handle-TailSwitch.
Source repository is at https://github.com/perlancar/perl-Tie-Handle-TailSwitch.
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.
Logfile::Tail::Switch
perlancar <perlancar@cpan.org>
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.
To install Tie::Handle::TailSwitch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::Handle::TailSwitch
CPAN shell
perl -MCPAN -e shell install Tie::Handle::TailSwitch
For more information on module installation, please visit the detailed CPAN module installation guide.