| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WWW::Noss::Home; |
|
2
|
2
|
|
|
2
|
|
126637
|
use 5.016; |
|
|
2
|
|
|
|
|
8
|
|
|
3
|
2
|
|
|
2
|
|
41
|
use strict; |
|
|
2
|
|
|
|
|
9
|
|
|
|
2
|
|
|
|
|
60
|
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
|
2
|
|
|
|
|
51
|
|
|
|
2
|
|
|
|
|
153
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '2.02'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
11
|
use Exporter 'import'; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
305
|
|
|
8
|
|
|
|
|
|
|
our @EXPORT_OK = qw(home); |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my $HOME = $^O eq 'Win32' ? $ENV{ USERPROFILE } : (<~>)[0]; |
|
11
|
|
|
|
|
|
|
undef $HOME if defined $HOME and ! -d $HOME; |
|
12
|
|
|
|
|
|
|
|
|
13
|
3
|
|
50
|
3
|
1
|
201216
|
sub home { $HOME // die "Could not determine home directory\n" } |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
1; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
WWW::Noss::Home - Find user's home directory |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 USAGE |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use WWW::Noss::Home qw(home); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $home = home; |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
B is a module that provides the C subroutine for |
|
30
|
|
|
|
|
|
|
locating the running user's home directory. This is a private module, please |
|
31
|
|
|
|
|
|
|
consult the L manual for user documentation. |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SUBROUTINES |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Subroutines are not exported automatically. |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=over 4 |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=item $home = home() |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Returns the path to the running user's home directory. Dies on failure. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=back |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 AUTHOR |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Written by Samuel Young, Esamyoung12788@gmail.comE. |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This project's source can be found on its |
|
50
|
|
|
|
|
|
|
L. Comments and pull |
|
51
|
|
|
|
|
|
|
requests are welcome! |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Copyright (C) 2025-2026 Samuel Young |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify |
|
58
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
|
59
|
|
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or |
|
60
|
|
|
|
|
|
|
(at your option) any later version. |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
L |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
# vim: expandtab shiftwidth=4 |