NAME
File::Symlink::Relative - Create relative symbolic links
SYNOPSIS
use File::Symlink::Relative;
symlink_r $source, $target;
DESCRIPTION
This Perl package creates relative symbolic links. All it really does is wrap the symlink built-in in suitable code.
SUBROUTINES
This class supports the following public subroutine:
symlink_r
This subroutine creates a relative symbolic link. All it really does is to wrap the Perl symlink built-in with code to convert the source file specification (OLDFILE in the parlance of perldoc -f symlink
) to a path relative to the target file (NEWFILE, a.k.a. the link to be created), and then delegate to the symlink built-in.
It returns whatever the built-in returns. An exception will be thrown if the operating system does not support symbolic links. See PORTABILITY below.
This subroutine is exported by default.
PORTABILITY
The functionality in this module requires the Perl symlink()
built-in to work under the host operating system. Without this support, the module should still install and load, but will throw an exception when called.
SYMLINK_SUPPORTED
This manifest constant is true if symbolic links are supported, and false if not.
It is not exported by default, but can be imported to your module by name or using the :all
tag.
SEE ALSO
The documentation for the symlink built-in.
ACKNOWLEDGMENT
This module was inspired by /r/perl post https://www.reddit.com/r/perl/comments/fluxay/can_i_make_relative_symbolic_links_in_perl/.
SUPPORT
Support is by the author. Please file bug reports at https://rt.cpan.org/Public/Dist/Display.html?Name=File-Symlink-Relative, https://github.com/trwyant/perl-File-Symlink-Relative/issues, or in electronic mail to the author.
AUTHOR
Thomas R. Wyant, III wyant at cpan dot org
COPYRIGHT AND LICENSE
Copyright (C) 2020-2021 by Thomas R. Wyant, III
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.