remove check for existing user out of DXUser::new
[spider.git] / perl / DXUser.pm
index a8fb7788c2e5406081f190c600970479c0a0b68b..fc2dab5c7a64106a7a30e1262fbcb7466b2b58bc 100644 (file)
@@ -11,6 +11,7 @@ package DXUser;
 require Exporter;
 @ISA = qw(Exporter);
 
+use DXLog;
 use DB_File;
 use Fcntl;
 use Carp;
@@ -113,7 +114,7 @@ sub new
        my $call = uc shift;
        #  $call =~ s/-\d+$//o;
   
-       confess "can't create existing call $call in User\n!" if $u{$call};
+#      confess "can't create existing call $call in User\n!" if $u{$call};
 
        my $self = bless {}, $pkg;
        $self->{call} = $call;
@@ -217,7 +218,8 @@ sub decode
        my $ref;
        $s = '$ref = ' . $s;
        eval $s;
-       confess $@ if $@;
+       Log('DXUser', $@) if $@;
+       $ref = undef if $@;
        return $ref;
 }