| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Slackware::SBoKeeper::Home; |
|
2
|
|
|
|
|
|
|
our $VERSION = '2.06'; |
|
3
|
3
|
|
|
3
|
|
121375
|
use 5.016; |
|
|
3
|
|
|
|
|
11
|
|
|
4
|
3
|
|
|
3
|
|
13
|
use strict; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
76
|
|
|
5
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
184
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
16
|
use Exporter 'import'; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
372
|
|
|
8
|
|
|
|
|
|
|
our @EXPORT = qw($HOME); |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $HOME = $ENV{HOME} || (getpwuid($<))[7] |
|
11
|
|
|
|
|
|
|
or die "Could not find home directory\n"; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
1; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Slackware::SBoKeeper::Home - Find home |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use Slackware::SBoKeeper::Home; |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
print "Home: $HOME\n"; |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Slackware::SBoKeeper::Home is a module that automatically finds the running |
|
28
|
|
|
|
|
|
|
user's home directory, which is then accessible by the automatically exported |
|
29
|
|
|
|
|
|
|
C<$HOME> variable. Slackware::SBoKeeper::Home should not be used outside of |
|
30
|
|
|
|
|
|
|
L. If you are looking L user documentation, please consult |
|
31
|
|
|
|
|
|
|
its manual. |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 ENVIRONMENT |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=over 4 |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=item HOME |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Used by C<$HOME>, if set. |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=back |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 AUTHOR |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Written by Samuel Young, Esamyoung12788@gmail.comE. |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 BUGS |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Report bugs on my Codeberg, L. |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Copyright (C) 2024-2025 Samuel Young |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under |
|
56
|
|
|
|
|
|
|
the terms of either: the GNU General Public License as published by the Free |
|
57
|
|
|
|
|
|
|
Software Foundation; or the Artistic License. |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |