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};