Commit 8ab20cd7 authored by sikeda's avatar sikeda
Browse files

[dev] Complete package use lists of each sources and fixed typos found during...

[dev] Complete package use lists of each sources and fixed typos found during that work.  Additionally, don't use Carp as less as possible: use die/warn.

git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@10786 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent c163f1b7
......@@ -28,6 +28,7 @@ use strict;
use warnings;
use Conf;
use Sympa::Constants;
use SDM;
use tools;
......
......@@ -17,6 +17,7 @@ use Sympa::Constants;
use List;
use Log;
use SDM;
use tools;
unless (Conf::load(Sympa::Constants::CONFIG)) {
die "Can't load Sympa configuration file";
......
......@@ -31,7 +31,6 @@ use HTTP::Cookies;
#use SOAP::Lite +trace;
use SOAP::Lite;
use Sympa::Constants;
use tools;
my ($reponse, @ret, $val, %fault);
......
......@@ -33,6 +33,8 @@ use Sympa::Language;
use List;
use Log;
use SDM;
use Sympa::Template::Compat;
use tools;
my %options;
......
......@@ -26,12 +26,15 @@ package Archive;
use strict;
use warnings;
use Carp qw();
use Cwd qw();
use Digest::MD5 qw();
use Encode qw();
use HTML::Entities qw();
use Conf;
use Log;
use Message;
use tools;
my $serial_number = 0; # incremented on each archived mail
......@@ -376,7 +379,7 @@ sub convert_single_message {
$listname = '';
$hostname = Conf::get_robot_conf($that, 'host');
} else {
Carp::croak('bug in logic. Ask developer');
die 'bug in logic. Ask developer';
}
my $msg_as_string;
......@@ -385,7 +388,7 @@ sub convert_single_message {
} elsif (ref $message eq 'HASH') {
$msg_as_string = $message->{'messageasstring'};
} else {
Carp::croak('bug in logic. Ask developer');
die 'bug in logic. Ask developer';
}
my $destination_dir = $opts{'destination_dir'};
......
......@@ -34,6 +34,9 @@ use List;
use Log;
use report;
use SDM;
use SympaSession;
use tools;
use Sympa::User;
## return the password finger print (this proc allow futur replacement of md5
## by sha1 or ....)
......
......@@ -26,17 +26,20 @@ package Commands;
use strict;
use warnings;
use Mail::Address;
use MIME::Parser;
use Archive;
use Conf;
use Sympa::Constants;
use Sympa::Language;
use List;
use Log;
use Message;
use Sympa::Regexps;
use report;
use Scenario;
use tools;
use Sympa::User;
my %comms = (
'add' => 'add',
......@@ -786,7 +789,7 @@ sub verify {
unless ($list) {
report::reject_report_cmd('user', 'no_existing_list',
{'listname' => $listname}, $cmd_line);
Sympa::Log::Syslog::do_log('info',
Log::do_log('info',
'VERIFY from %s refused, unknown list for robot %s',
$sender, $robot);
return 'unknown_list';
......
......@@ -26,6 +26,8 @@ package DBManipulatorSQLite;
use strict;
use warnings;
use DBI qw();
use POSIX qw();
use Log;
......
......@@ -26,6 +26,7 @@ package Datasource;
use strict;
use warnings;
use Digest::MD5 qw();
use Log;
use Sympa::Regexps;
......
......@@ -38,8 +38,9 @@ package Family;
use strict;
use warnings;
use File::Copy;
use File::Copy qw();
use Term::ProgressBar;
use XML::LibXML;
use admin;
use Conf;
......@@ -49,6 +50,8 @@ use Sympa::Language;
use List;
use Log;
use Sympa::Regexps;
use Scenario;
use tools;
my $language = Sympa::Language->instance;
......@@ -2229,32 +2232,6 @@ Splits the XML family file into XML list files. New list names are put in the ar
=item * XML::LibXML::Document::createDocument
=item * XML::LibXML::Document::documentElement
=item * XML::LibXML::Document::encoding
=item * XML::LibXML::Document::setDocumentElement
=item * XML::LibXML::Document::toFile
=item * XML::LibXML::Document::version
=item * XML::LibXML::Node::childNodes
=item * XML::LibXML::Node::getChildrenByTagName
=item * XML::LibXML::Node::line_number
=item * XML::LibXML::Node::nodeName
=item * XML::LibXML::Node::nodeType
=item * XML::LibXML::Node::textContent
=item * XML::LibXML::Parser::line_numbers
=item * XML::LibXML::Parser::parse_file
=back
=cut
......@@ -2986,7 +2963,7 @@ sub _copy_files {
# instance.xml
if (defined $file) {
unless (&File::Copy::copy("$dir/$file", "$list_dir/instance.xml")) {
unless (File::Copy::copy("$dir/$file", "$list_dir/instance.xml")) {
Log::do_log(
'err',
'Family::_copy_files(%s) : impossible to copy %s/%s into %s/instance.xml : %s',
......
......@@ -91,11 +91,11 @@ sub get_https {
unless ($ssl_socket) {
Log::do_log('err', 'error %s unable to connect https://%s:%s/',
&IO::Socket::SSL::errstr, $host, $port);
IO::Socket::SSL::errstr(), $host, $port);
return undef;
}
Log::do_log('debug', 'connected to https://%s:%s/',
&IO::Socket::SSL::errstr, $host, $port);
IO::Socket::SSL::errstr(), $host, $port);
if (ref($ssl_socket) eq "IO::Socket::SSL") {
my $subject_name = $ssl_socket->peer_certificate("subject");
......@@ -180,7 +180,7 @@ sub get_https2 {
unless ($ssl_socket) {
Log::do_log('err', 'error %s unable to connect https://%s:%s/',
&IO::Socket::SSL::errstr, $host, $port);
IO::Socket::SSL::errstr(), $host, $port);
return undef;
}
Log::do_log('debug', "connected to https://$host:$port/");
......
......@@ -27,6 +27,8 @@ package Ldap;
use strict;
use warnings;
use Log;
my @valid_options = qw(host suffix filter scope bind_dn bind_password);
my @required_options = qw(host suffix filter);
......
......@@ -26,9 +26,13 @@ package List;
use strict;
use warnings;
use Encode;
use Digest::MD5 qw();
use Encode qw();
use HTML::Entities qw();
use HTTP::Request;
use IO::Scalar;
use Mail::Address;
use MIME::Charset;
use MIME::Decoder;
use MIME::EncWords;
use MIME::Entity;
......@@ -36,8 +40,10 @@ use MIME::Parser;
use POSIX qw();
use Storable;
use Time::Local qw();
use XML::LibXML;
use Archive;
use Auth;
use Conf;
use Sympa::Constants;
use Datasource;
......@@ -57,6 +63,7 @@ use SDM;
use SQLSource;
use Task;
use tools;
use tracking;
use tt2;
use Sympa::User;
use WebAgent;
......@@ -1484,7 +1491,7 @@ sub _save_config_changes_file {
# the value is a scalar or a ref on an array of scalar
# (for parameter digest : only for days)
sub get_param_value {
Sympa::Log::Syslog::do_log('debug3', '(%s, %s, %s)', @_);
Log::do_log('debug3', '(%s, %s, %s)', @_);
my $self = shift;
my $param = shift;
my $as_arrayref = shift || 0;
......
......@@ -31,7 +31,10 @@ use POSIX qw();
use Scalar::Util;
use Sys::Syslog qw();
use Conf;
use List;
use SDM;
use tools;
my ($log_facility, $log_socket_type, $log_service, $sth, @sth_stack,
$rows_nb);
......
......@@ -46,8 +46,8 @@ use MIME::Parser;
use Conf;
use List;
use Log;
use Scenario;
use tools;
use tt2;
=pod
......@@ -99,8 +99,6 @@ Creates a new Message object.
=item * MIME::EncWords::decode_mimewords
=item * MIME::Entity::as_string
=item * MIME::Head::get
=item * MIME::Parser::output_to_core
......
......@@ -83,6 +83,7 @@ package PlainDigest;
use strict;
use warnings;
use Encode qw();
use HTML::TreeBuilder;
use Mail::Address;
use MIME::Charset;
......
......@@ -33,6 +33,7 @@ use Sympa::DatabaseDescription;
use Log;
use List;
use SQLSource;
use tools;
# db structure description has moved in Sympa/Constant.pm
my %db_struct = Sympa::DatabaseDescription::db_struct();
......
......@@ -28,12 +28,10 @@ use strict;
use warnings;
use DBI;
use Log;
use Conf;
use List;
use tools;
use tt2;
use Datasource;
use List;
use Log;
## Structure to keep track of active connections/connection status
## Key : connect_string (includes server+port+dbname+DB type)
......
......@@ -32,10 +32,13 @@ use Net::Netmask;
use Conf;
use Sympa::Constants;
use Sympa::Language;
use Ldap;
use LDAPSource;
use List;
use Log;
use SQLSource;
use tools;
use Sympa::User;
my %all_scenarios;
my %persistent_cache;
......@@ -1034,7 +1037,7 @@ sub verify {
return -1; ## always skip this rule because we can't evaluate it
}
my $block;
unless ($block = new2 Net::Netmask($args[0])) {
unless ($block = Net::Netmask->new2($args[0])) {
Log::do_log('err',
"error rule syntaxe : failed to parse netmask '$args[0]'");
return undef;
......
......@@ -25,6 +25,7 @@
package Sympa::DatabaseDescription;
use strict;
use warnings;
my %full_db_struct = (
'subscriber_table' => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment