-
-
20 Sep 2018 07:45:10 UTC
- Distribution: PERLANCAR-File-HomeDir
- Module version: 0.060
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (5501 / 0 / 47)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.10.1
- Activity
24 month- Tools
- Download (14.59KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- NAME
- VERSION
- SYNOPSIS
- DESCRIPTION
- VARIABLES
- FUNCTIONS
- HOMEPAGE
- SOURCE
- BUGS
- SEE ALSO
- AUTHOR
- COPYRIGHT AND LICENSE
NAME
PERLANCAR::File::HomeDir - Lightweight way to get current user's home directory
VERSION
This document describes version 0.060 of PERLANCAR::File::HomeDir (from Perl distribution PERLANCAR-File-HomeDir), released on 2018-09-20.
SYNOPSIS
use PERLANCAR::File::HomeDir qw(get_my_home_dir get_user_home_dir); my $dir = get_my_home_dir(); # e.g. "/home/ujang" $dir = get_user_home_dir("ujang");
DESCRIPTION
This is a (temporary?) module to get user's home directory. It is a lightweight version of File::HomeDir with fewer OS support (only Windows and Unix) and fewer logic/heuristic.
VARIABLES
$DIE_ON_FAILURE => bool (default: 0)
If set to true, will die on failure. Else, function usually return undef on failure.
FUNCTIONS
None are exported by default, but they are exportable.
get_my_home_dir
Usage:
my $home_dir = get_my_home_dir();
Try several ways to get home directory of the current user. Return undef or die (depends on
$DIE_ON_FAILURE
) if everything fails.get_user_home_dir
Usage:
my $home_dir = get_user_home_dir($username);
Try several ways to get home directory of a specified user (
$username
).HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/PERLANCAR-File-HomeDir.
SOURCE
Source repository is at https://github.com/perlancar/perl-PERLANCAR-File-HomeDir.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=PERLANCAR-File-HomeDir
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.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2018, 2017, 2016, 2015 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.
Module Install Instructions
To install PERLANCAR::File::HomeDir, copy and paste the appropriate command in to your terminal.
cpanm PERLANCAR::File::HomeDir
perl -MCPAN -e shell install PERLANCAR::File::HomeDir
For more information on module installation, please visit the detailed CPAN module installation guide.