From 42c5d147d5b4d523810b3b9903850f3cfc64bfb2 Mon Sep 17 00:00:00 2001 From: eleksir Date: Mon, 23 Nov 2020 00:53:16 +0300 Subject: [PATCH] Remove debug in fortune_seed.pl, remove unused botlib in fortune.pm and friday.pm --- bin/fortune_seed.pl | 2 -- lib/fortune.pm | 4 +--- lib/friday.pm | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/bin/fortune_seed.pl b/bin/fortune_seed.pl index 83ebae3..35a8e99 100644 --- a/bin/fortune_seed.pl +++ b/bin/fortune_seed.pl @@ -22,8 +22,6 @@ BEGIN { use lib ("$workdir/lib", "$workdir/vendor_perl", "$workdir/vendor_perl/lib/perl5"); use fortune qw(seed fortune); -use Carp; -$SIG{__DIE__} = sub { Carp::confess @_ }; seed (); diff --git a/lib/fortune.pm b/lib/fortune.pm index 502dda0..0603ee3 100644 --- a/lib/fortune.pm +++ b/lib/fortune.pm @@ -19,7 +19,6 @@ use SQLite_File; use MIME::Base64; use File::Path qw(mkpath); use conf qw(loadConf); -use botlib qw(logger); my $c = loadConf(); my $dir = $c->{fortune}->{dir}; @@ -42,9 +41,8 @@ sub seed () { while (my $fortunefile = readdir ($srcdirhandle)) { my $srcfile = sprintf '%s/%s', $srcdir, $fortunefile; -# next; next unless (-f $srcfile); -# next if (m/[\.|\$|\@]/); + next if ($fortunefile =~ m/\./); open (my $fh, '<', $srcfile) || croak "Unable to open $srcfile, $OS_ERROR\n"; # set correct phrase delimiter local $INPUT_RECORD_SEPARATOR = "\n%\n"; diff --git a/lib/friday.pm b/lib/friday.pm index 548abf3..c1d8009 100644 --- a/lib/friday.pm +++ b/lib/friday.pm @@ -19,7 +19,6 @@ use SQLite_File; use MIME::Base64; use File::Path qw(mkpath); use conf qw(loadConf); -use botlib qw(logger); my $c = loadConf(); my $dir = $c->{friday}->{dir};