summaryrefslogtreecommitdiff
path: root/lib/App/Raps2.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-05-06 20:26:28 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-05-06 20:26:28 +0200
commiteafdf6dea5918688560141e1fb9242ee1c1820fe (patch)
tree0ced151a9107b6f6534b96b62f8e1a67d35cf21d /lib/App/Raps2.pm
parent83363bb2a6902d1caca2b81615f15d08be74d4d7 (diff)
Fix XDG_{CONFIG,DATA}_HOME handling bug (use File::BaseDir for it). thx mxey
Diffstat (limited to 'lib/App/Raps2.pm')
-rw-r--r--lib/App/Raps2.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/App/Raps2.pm b/lib/App/Raps2.pm
index 6710d48..f05f21e 100644
--- a/lib/App/Raps2.pm
+++ b/lib/App/Raps2.pm
@@ -38,6 +38,7 @@ use base 'Exporter';
use App::Raps2::Password;
use App::Raps2::UI;
use Carp q(confess);
+use File::BaseDir qw(config_home data_home);
use File::Path qw(make_path);
use File::Slurp qw(slurp write_file);
@@ -105,9 +106,8 @@ sub new {
my ($obj, %conf) = @_;
my $ref = {};
- $ref->{'xdg_conf'} = $ENV{'XDG_CONFIG_HOME'} // "$ENV{HOME}/.config/raps2";
- $ref->{'xdg_data'} = $ENV{'XDG_DATA_HOME'} //
- "$ENV{HOME}/.local/share/raps2";
+ $ref->{'xdg_conf'} = config_home('raps2');
+ $ref->{'xdg_data'} = data_home('raps2');
$ref->{'ui'} = App::Raps2::UI->new();