relpath - Return the relative pathname
version 0.02
Usage:
% relpath [OPTIONS] <filename> ...
Examples:
% relpath /etc/passwd /home/steven/f1 subdir/f2 ../../etc/passwd f1 subdir/f2
This program complements the Unix command realpath. realpath converts relative pathnames to absolute ones, while relpath does the opposite.
The actual routine used is File::Spec's abs2rel() function.
abs2rel()
By default, will check first that the filenames exist, unless --nocheck (-C) is specified.
--nocheck
-C
--[no]check, -c
Whether to check that file exists. Default is on.
Alias for --nocheck.
0 on success.
1 on some error, e.g. some filenames are not found (and --check is on).
99 on command-line options error.
Option to set pwd.
Actually check the existence of files.
realpath
Please visit the project's homepage at https://metacpan.org/release/App-relpath.
Source repository is at https://github.com/sharyanto/perl-App-relpath.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-relpath
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.
Steven Haryanto <stevenharyanto@gmail.com>
This software is copyright (c) 2014 by Steven Haryanto.
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 App::relpath, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::relpath
CPAN shell
perl -MCPAN -e shell install App::relpath
For more information on module installation, please visit the detailed CPAN module installation guide.