diff options
author | cebka@lenovo-laptop <cebka@lenovo-laptop> | 2010-03-15 20:54:39 +0300 |
---|---|---|
committer | cebka@lenovo-laptop <cebka@lenovo-laptop> | 2010-03-15 20:54:39 +0300 |
commit | 21dc91eac153c2dade3c393d0e6f6c4e66d51a94 (patch) | |
tree | af35c7d36f5546a7c1ec835c6e4f99aa9a460ea4 /perl/lib | |
parent | 9cb57d681480ca0a2b7b709ba2253b04cb5a6f72 (diff) | |
download | rspamd-21dc91eac153c2dade3c393d0e6f6c4e66d51a94.tar.gz rspamd-21dc91eac153c2dade3c393d0e6f6c4e66d51a94.zip |
* Fix another spf core dump while parsing 'include' items
Diffstat (limited to 'perl/lib')
-rw-r--r-- | perl/lib/Mail/Rspamd/Client.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/perl/lib/Mail/Rspamd/Client.pm b/perl/lib/Mail/Rspamd/Client.pm index f026de8cc..9460b1ee9 100644 --- a/perl/lib/Mail/Rspamd/Client.pm +++ b/perl/lib/Mail/Rspamd/Client.pm @@ -28,6 +28,7 @@ the spamd protocol. package Mail::Rspamd::Client; use IO::Socket; +use Carp; use vars qw($VERSION); $VERSION = "1.02"; @@ -125,7 +126,7 @@ sub make_ssl_socket { eval { require IO::Socket::SSL; IO::Socket::SSL->import(LIST); - } or$self->{error} = "IO::Socket::SSL required for imaps"; + } or croak "IO::Socket::SSL required for imaps"; return IO::Socket::SSL->new("$host:$port"); } @@ -240,6 +241,7 @@ C<$is_check_p> either calls PROCESS or CHECK. The return value is a hash reference containing metrics indexed by name. Each metric is hash that contains data: + =over =item * isspam @@ -275,6 +277,7 @@ This method makes a call to the spamd server The return value is a hash reference containing metrics indexed by name. Each metric is hash that contains data: + =over =item * isspam @@ -1205,7 +1208,7 @@ sub process_imap { chomp $password; Term::ReadKey->ReadMode('normal'); $self->{error} = "\n"; - } or die "cannot get password. Check that Term::ReadKey is installed"; + } or croak "cannot get password. Check that Term::ReadKey is installed"; } # Stupid code that does not take care of timeouts etc, just trying to extract messages |