print "Server $0 ready at $server_url\n";
while (my $client = $server->accept()) {
+
+ eval { # don't die inside here!
+
$client->autoflush(1);
my $request = <$client>;
warn "ERROR ", dump($borrower);
} else {
$hash->{borrower} = $borrower->{borrower};
+ $hash->{content} = $borrower->{borrower}->{cardnumber}; # compatibile with 3M tags
}
} else {
$hash->{security} = uc unpack 'H*', $rfid->afi( $tag );
print $client "HTTP/1.0 500 No method\r\n\r\n";
}
close $client;
+
+ }; # end of eval
+ if ( $@ ) {
+ warn "ERROR: $@";
+ }
+
}
die "server died";