App::DocKnot::Util(3pm) | User Contributed Perl Documentation | App::DocKnot::Util(3pm) |
App::DocKnot::Util - Shared utility functions for other DocKnot modules
use App::DocKnot::Util qw( is_newer latest_tarball print_checked print_fh ); use Path::Tiny qw(path); print_checked('some stdout output'); my @inputs = (path('/input-1'), path('/input-2')); if (!is_newer(path('/output'), @inputs)) { open(my $fh, '>', '/output'); print_fh($fh, '/output', 'some stuff'); close($fh); } my $latest_ref = latest_tarball(path('/archive'), 'App-Foo');
Perl 5.24 or later and the modules List::SomeUtils, Path::Tiny, and Sort::Versions, available from CPAN.
This module collects utility functions used by other App::DocKnot modules. It is not really intended for use outside of DocKnot, but these functions can be used if desired.
This is mostly equivalent to "print {fh}" but throws a text exception in the event of a failure.
Russ Allbery <rra@cpan.org>
Copyright 1999-2011, 2013, 2021-2022 Russ Allbery <rra@cpan.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
App::DocKnot
This module is part of the App-DocKnot distribution. The current version of DocKnot is available from CPAN, or directly from its web site at <https://www.eyrie.org/~eagle/software/docknot/>.
2022-01-20 | perl v5.32.1 |