line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::UserDirs; |
2
|
1
|
|
|
1
|
|
57972
|
use strict; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
28
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
4
|
1
|
|
|
1
|
|
526
|
use IPC::System::Simple qw(capturex); |
|
1
|
|
|
|
|
11175
|
|
|
1
|
|
|
|
|
54
|
|
5
|
1
|
|
|
1
|
|
400
|
use parent qw(Exporter); |
|
1
|
|
|
|
|
283
|
|
|
1
|
|
|
|
|
5
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.08'; |
8
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
9
|
|
|
|
|
|
|
all => [ |
10
|
|
|
|
|
|
|
qw(xdg_desktop_dir xdg_documents_dir xdg_download_dir xdg_music_dir |
11
|
|
|
|
|
|
|
xdg_pictures_dir xdg_publicshare_dir xdg_templates_dir xdg_videos_dir) |
12
|
|
|
|
|
|
|
]); |
13
|
|
|
|
|
|
|
our @EXPORT_OK = @{$EXPORT_TAGS{all}}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _xdg_user_dir { |
17
|
0
|
|
|
0
|
|
|
my ($purpose) = @_; |
18
|
0
|
|
|
|
|
|
my $dir = capturex 'xdg-user-dir', $purpose; |
19
|
0
|
|
|
|
|
|
chomp $dir; |
20
|
0
|
|
|
|
|
|
return $dir; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub xdg_desktop_dir {return _xdg_user_dir 'DESKTOP';} |
24
|
0
|
|
|
0
|
1
|
|
sub xdg_documents_dir {return _xdg_user_dir 'DOCUMENTS';} |
25
|
0
|
|
|
0
|
1
|
|
sub xdg_download_dir {return _xdg_user_dir 'DOWNLOAD';} |
26
|
0
|
|
|
0
|
1
|
|
sub xdg_music_dir {return _xdg_user_dir 'MUSIC';} |
27
|
0
|
|
|
0
|
1
|
|
sub xdg_pictures_dir {return _xdg_user_dir 'PICTURES';} |
28
|
0
|
|
|
0
|
1
|
|
sub xdg_publicshare_dir {return _xdg_user_dir 'PUBLICSHARE';} |
29
|
0
|
|
|
0
|
1
|
|
sub xdg_templates_dir {return _xdg_user_dir 'TEMPLATES';} |
30
|
0
|
|
|
0
|
1
|
|
sub xdg_videos_dir {return _xdg_user_dir 'VIDEOS';} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |