App-SymlinkUtils
view release on metacpan or search on metacpan
script/check-symlinks view on Meta::CPAN
use 5.010001;
use strict;
use warnings;
use Log::ger;
use Perinci::CmdLine::Any;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-08-25'; # DATE
our $DIST = 'App-SymlinkUtils'; # DIST
our $VERSION = '0.004'; # VERSION
my $cmdline = Perinci::CmdLine::Any->new(
url => "/App/SymlinkUtils/check_symlinks",
program_name => "check-symlinks",
log => 1,
log_level => "info",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Perform various checks on symlinks
# PODNAME: check-symlinks
__END__
=pod
=encoding UTF-8
=head1 NAME
check-symlinks - Perform various checks on symlinks
=head1 VERSION
This document describes version 0.004 of check-symlinks (from Perl distribution App-SymlinkUtils), released on 2023-08-25.
=head1 SYNOPSIS
B<check-symlinks> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<check-symlinks> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<check-symlinks> [B<L<--content-matches|/"--content-matches">>|B<L<--no-content-matches|/"--content-matches">>|B<L<--nocontent-matches|/"--content-matches">>] [B<L<--debug|/"--debug">>|B<L<--log-level|/"--log-level=s">>=I<level>|B<L<--quiet|/"--quie...
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--content-matches>
Whether content should match extension.
If set to true, will guess media type from content and check that file extension
exists nd matches the media type. Requires L<File::MimeInfo::Magic>, which is
only specified as a "Recommends" dependency by File-Symlink-Util distribution.
=item B<--ext-matches>
Whether extension should match.
If set to true, then if both symlink name and target filename contain filename
extension (e.g. C<jpg>) then they must match. Case variation is allowed (e.g.
C<JPG>) but other variation is not (e.g. C<jpeg>).
=item B<--is-abs>
Whether we should check that symlink target is an absolute path.
If set to true, then symlink target must be an absolute path. If
set to false, then symlink target must be a relative path.
=item B<--is-rel>
Alias for --isnt-abs.
See C<--is-abs>.
=item B<--isnt-rel>
Alias for --is-abs.
See C<--is-abs>.
=item B<--symlink>=I<s@>*
Symlinks to check.
Can also be specified as the 1st command-line argument and onwards.
Can be specified multiple times.
=item B<--symlinks-json>=I<s>
Symlinks to check (JSON-encoded).
See C<--symlink>.
Can also be specified as the 1st command-line argument and onwards.
=back
=head2 Logging options
=over
=item B<--debug>
Shortcut for --log-level=debug.
=item B<--log-level>=I<s>
( run in 0.685 second using v1.01-cache-2.11-cpan-39bf76dae61 )