Code cleanup and port on argument

This commit is contained in:
Thomas Schwery 2010-08-15 20:04:46 +02:00
parent 4f267ca3ff
commit d0c2b55478

View file

@ -7,6 +7,7 @@
# TODO:
# - Support for a list of tags
# - Cleanup on ctrl-c
# - Default port if failure
# - ...
use strict;
@ -20,8 +21,9 @@ use Date::Parse;
use Date::Format;
use threads;
our $port = 7071;
our %entries = ();
our ($port) = @ARGV;
print "Port is " . $port . "\n";
$SIG{INT} = \&signal_handler_interrupt;
@ -144,7 +146,6 @@ sub read_entry_file {
sub map_blog_entry {
my ($entry_file, $entry_dir) = @_;
my $entry_title = read_entry_file($entry_dir . "/" . $entry_file);
print "Entry : " . $entry_dir . " + " . $entry_file . " + " . $entry_title . "\n";
return "0" . $entry_title . "\t" . $entry_dir . "/" . $entry_file . "\tlocalhost\t" . $port;
}