aboutsummaryrefslogtreecommitdiff
path: root/lib/TgLib/Env.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TgLib/Env.pm')
-rw-r--r--lib/TgLib/Env.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/TgLib/Env.pm b/lib/TgLib/Env.pm
new file mode 100644
index 0000000..b1e94aa
--- /dev/null
+++ b/lib/TgLib/Env.pm
@@ -0,0 +1,10 @@
+package TgLib::Env;
+
+use parent qw<Exporter>;
+our @EXPORT = qw<$HOME $CONFIG_HOME $CACHE_HOME>;
+
+our $HOME = $ENV{'HOME'};
+our $CONFIG_HOME = $ENV{'XDG_CONFIG_HOME'} || "$HOME/.config";
+our $CACHE_HOME = $ENV{'XDG_CACHE_HOME'} || "$HOME/.cache";
+
+1;