From 47fb4fc02407def9d9b19a2746983b8c65937e3f Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Mon, 24 Jun 2019 12:04:15 +0200 Subject: TgLib.{Cache,Env} --- lib/TgLib/Env.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/TgLib/Env.pm (limited to 'lib/TgLib/Env.pm') 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; +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; -- cgit v1.2.3