| 1 | package Finance::Dogecoin::Utils; | ||
| 2 | # ABSTRACT: Libraries and Utilities to work with Dogecoin | ||
| 3 | $Finance::Dogecoin::Utils::VERSION = '1.20230424.0253'; | ||
| 4 | use strict; | ||
| 5 | use warnings; | ||
| 6 | |||
| 7 | use File::HomeDir; | ||
| 8 | use Path::Tiny; | ||
| 9 | |||
| 10 | use Exporter::Shiny our @EXPORT = qw( get_conf_dir get_auth_file get_dogecoin_conf_dir ); | ||
| 11 | |||
| 12 | sub get_conf_dir { | ||
| 13 | return path(File::HomeDir->my_data)->child('dogeutils')->mkdir; | ||
| 14 | } | ||
| 15 | |||
| 16 | sub get_auth_file { | ||
| 17 | return get_conf_dir()->child( 'auth.json' ); | ||
| 18 | } | ||
| 19 | |||
| 20 | sub get_dogecoin_conf_dir { | ||
| 21 | return path(File::HomeDir->my_home)->child('.dogecoin')->child('backups'); | ||
| 22 | } | ||
| 23 | |||
| 24 | 1; | ||
| 25 | |||
| 26 | __END__ |