changed how module loads

This commit is contained in:
gwyn 2026-03-04 14:43:36 -05:00
parent 10c04fbaae
commit 3767df26f9
2 changed files with 24 additions and 2 deletions

18
Secrets.pm.example Normal file
View file

@ -0,0 +1,18 @@
package Secrets;
use strict;
use warnings;
use Exporter 'import';
our @EXPORT_OK = qw(
TELEGRAM_TOKEN
TELEGRAM_USER_ID
NICKSERV_PASSWORD
IRC_CHANNEL
);
use constant TELEGRAM_TOKEN => 'Bot Token'
use constant TELEGRAM_USER_ID => 123456789;
use constant NICKSERV_PASSWORD => 'supersecretpassword';
use constant IRC_CHANNEL => '#lobby';
1;

View file

@ -4,8 +4,12 @@ use warnings;
use POE;
use POE::Component::IRC;
use WWW::Telegram::BotAPI;
require './.secrets.pm';
use Secrets qw(
TELEGRAM_TOKEN
TELEGRAM_USER_ID
NICKSERV_PASSWORD
IRC_CHANNEL
);
my $IRC_SERVER = '127.0.0.1';
my $IRC_PORT = 6667;
my $IRC_NICK = 'Jerry';