comparison scan.pl @ 264:3b3f1306255a

added _croak message to track the database locking issue
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Mon, 24 Nov 2008 17:44:43 +0800
parents b01560b95779
children aaffc50e3318
comparison
equal deleted inserted replaced
263:83e3ce37779d 264:3b3f1306255a
10 package Ikariam::Scanner; 10 package Ikariam::Scanner;
11 use strict; 11 use strict;
12 use Carp; 12 use Carp;
13 use Ikariam; 13 use Ikariam;
14 use Data::Dumper; 14 use Data::Dumper;
15 use Error;
15 use Parallel::ForkManager; 16 use Parallel::ForkManager;
16 17
17 sub new { 18 sub new {
18 my($class, $i) = @_; 19 my($class, $i) = @_;
19 warn("new scanner"); 20 warn("new scanner");
20 my $self = { 21 my $self = {
21 ikariam => $i, 22 ikariam => $i,
22 }; 23 };
23 24
24 return bless $self, $class; 25 return bless $self, $class;
26 }
27
28 sub _croak {
29 my ($self, $message, %info) = @_;
30 Error->throw(-text => $message, %info);
31 return;
25 } 32 }
26 33
27 sub saveCities 34 sub saveCities
28 { 35 {
29 my ($self, $island, @cities) = @_; 36 my ($self, $island, @cities) = @_;