Commit 9b4a3e56 authored by sikeda's avatar sikeda
Browse files

[dev] Won't use indirect method calls such as "new Class()". Use "Class->new()" insead.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@10699 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent a6ae2a90
......@@ -87,7 +87,7 @@ SDM::probe_db();
chdir $Conf::Conf{'home'};
my $list = new List($listname, $robot)
my $list = List->new($listname, $robot)
or die 'Cannot create List object';
my $home_sympa;
......
......@@ -54,7 +54,7 @@ foreach my $msg ( sort grep(!/^\./, readdir SPOOL )) {
print "Creating HTML version for $Conf::Conf{'queuemod'}/$msg\n";
my ($listname, $listrobot) = split /\@/, $listaddress;
my $self = new List ($listname, $listrobot);
my $self = List->new($listname, $listrobot);
my( @rcpt);
my $admin = $self->{'admin'};
......
......@@ -72,7 +72,7 @@ if (($main::options{'help'} ne '') ||
}else{
if ($listname) {
my $self = new List($listname, $robot);
my $self = List->new($listname, $robot);
$cert = $self->{'dir'}.'/cert.pem';
$privatekey = $self->{'dir'}.'/private_key';
unless (-d $self->{'dir'}) {
......
......@@ -139,7 +139,7 @@ sub play_soap_as_trusted{
my $proxy_vars=shift;
my $service_parameters=shift;
my $soap = new SOAP::Lite();
my $soap = SOAP::Lite->new();
$soap->uri('urn:sympasoap');
$soap->proxy($soap_url);
......@@ -163,7 +163,7 @@ sub get_email {
my ($service, $reponse, @ret, $val, %fault);
## Cookies management
# my $uri = new URI($soap_url);
# my $uri = URI->new($soap_url);
# my $cookies = HTTP::Cookies->new(ignore_discard => 1,
# file => '/tmp/my_cookies' );
......@@ -171,7 +171,7 @@ sub get_email {
printf "cookie : %s\n", $cookie;
my $soap = new SOAP::Lite();
my $soap = SOAP::Lite->new();
#$soap->on_debug(sub{print@_});
$soap->uri('urn:sympasoap');
$soap->proxy($soap_url);
......@@ -197,7 +197,7 @@ sub play_soap{
my ($reponse, @ret, $val, %fault);
## Cookies management
# my $uri = new URI($soap_url);
# my $uri = URI->new($soap_url);
my $cookies = HTTP::Cookies->new(ignore_discard => 1,
file => '/tmp/my_cookies' );
......@@ -216,7 +216,7 @@ sub play_soap{
#$reponse = $service->login($user_email,$user_password);
#my $soap = SOAP::Lite->service($soap_url);
my $soap = new SOAP::Lite() || die;
my $soap = SOAP::Lite->new() || die;
#$soap->on_debug(sub{print@_});
$soap->uri('urn:sympasoap');
$soap->proxy($soap_url,
......
......@@ -1169,7 +1169,7 @@ Log::do_log(info => "WWSympa started, process $$");
wwslog('info', "parameter css_url '%s' seems strange, it must be the url of a directory not a css file", $param->{'css_url'}) if ($param->{'css_url'} =~ /\.css$/);
 
$session = new SympaSession ($robot,{'cookie'=>SympaSession::get_session_cookie($ENV{'HTTP_COOKIE'}),
$session = SympaSession->new($robot,{'cookie'=>SympaSession::get_session_cookie($ENV{'HTTP_COOKIE'}),
'action'=>$in{'action'},
'rss'=>$rss, 'ajax' => $ajax});
 
......@@ -1177,7 +1177,7 @@ Log::do_log(info => "WWSympa started, process $$");
unless (defined $session) {
List::send_notify_to_listmaster('failed_to_create_web_session', $robot);
wwslog('info','Failed to create session');
$session = new SympaSession($robot, {});
$session = SympaSession->new($robot, {});
}
# Retreive oauth_token from session if it exists and if we have a (newly) identified user
......@@ -1190,7 +1190,7 @@ Log::do_log(info => "WWSympa started, process $$");
if (defined $automatic_list_families) {
foreach my $key (keys %{$automatic_list_families}){
my $family;
if ($family = new Family($key,$robot)) {
if ($family = Family->new($key,$robot)) {
if ($family->is_allowed_to_create_automatic_lists(('auth_level' => 'md5', 'sender' => $session->{'email'}, 'message' => undef, 'listname' => ''))){
$session->{'is_family_owner'}{$key} = 1;
}else{
......@@ -1406,7 +1406,7 @@ Log::do_log(info => "WWSympa started, process $$");
export_topics ($robot);
unless ($comm{$action}) {
if (new List ($action, $robot)){
if (List->new($action, $robot)){
do_redirect ($param->{'base_url'}.$param->{'path_cgi'}.'/info/'.$action);
last;
}
......@@ -2707,7 +2707,7 @@ Use it to create a List object and initialize output parameters.
$in{'list'} = $1;
 
## Create a new List instance.
unless ($list = new List ($in{'list'}, $robot)) {
unless ($list = List->new($in{'list'}, $robot)) {
report::reject_report_web('user','unknown_list',{'list' => $in{'list'}},$param->{'action'},'');
wwslog('info','check_param_in: unknown list %s', $in{'list'});
return undef;
......@@ -2724,7 +2724,7 @@ Use it to create a List object and initialize output parameters.
 
if ($in{'list'}) {
## Create a new List instance.
unless ($list = new List ($in{'list'}, $robot, {})) {
unless ($list = List->new($in{'list'}, $robot, {})) {
report::reject_report_web('user','unknown_list',{'list' => $in{'list'}},$param->{'action'},'');
wwslog('info','check_param_in: unknown list %s', $in{'list'});
return undef;
......@@ -3778,7 +3778,7 @@ sub do_sso_login_succeeded {
next unless ($auth =~ /$ldap->{'regexp'}/i);
 
my $param = tools::dup_var($ldap);
my $ds = new LDAPSource($param);
my $ds = LDAPSource->new($param);
 
unless (defined $ds && ($ldap_anonymous = $ds->connect())) {
Log::do_log('err',"Unable to connect to the LDAP server '%s'", $ldap->{'ldap_host'});
......@@ -4337,7 +4337,7 @@ sub do_renewpasswd {
 
## get msg count for each list
foreach my $l (keys (%{$param->{'which'}})) {
my $list = new List ($l, $robot);
my $list = List->new($l, $robot);
my $file = "$list->{'dir'}/msg_count";
my %count ;
......@@ -5247,7 +5247,7 @@ sub do_multiple_subscribe {
foreach my $requested_list (@lists) {
my $param->{'list'} = new List ($requested_list, $robot);
my $param->{'list'} = List->new($requested_list, $robot);
$results{'requested_list'} = do_subscribe();
}
}
......@@ -8324,7 +8324,7 @@ sub do_remove_arc {
my $message;
if ($msgfile) {
 
unless ($message = new Message({'file'=> "$arcpath/arctxt/$msgfile",'noxsympato'=>'noxsympato'}) ) {
unless ($message = Message->new({'file'=> "$arcpath/arctxt/$msgfile",'noxsympato'=>'noxsympato'}) ) {
$param->{'status'} = 'message_err';
wwslog('info', 'do_send_me : could not read file %s',"$arcpath/arctxt/$msgfile");
return undef;
......@@ -9120,7 +9120,7 @@ Creates a list using a list template
$parameters->{'custom_input'} = $in{'custom_input'};
 
## create liste
if (my $testlist = new List($in{'listname'},$robot)){
if (my $testlist = List->new($in{'listname'},$robot)){
report::reject_report_web('user','list_already_exists',{'new_listname'=> $in{'listname'}},$param->{'action'},'',$param->{'user'}{'email'},$robot);
wwslog('info','do_create_list: requested list %s already exist (from %s)',$in{'listname'},$param->{'user'}{'email'});
web_db_log({'parameters' => $in{'listname'},
......@@ -11148,7 +11148,7 @@ sub do_purge_list {
my @lists = split /\0/, $in{'selected_lists'};
 
foreach my $l (@lists) {
my $list = new List ($l, $robot);
my $list = List->new($l, $robot);
next unless (defined $list);
$list->purge($param->{'user'}{'email'});
}
......@@ -16115,7 +16115,7 @@ sub do_suspend_request_action {
my $report = "";
foreach my $line (@lists) {
 
my $unsub_list = new List ($line, $robot);
my $unsub_list = List->new($line, $robot);
unless ($unsub_list) {
wwslog('info', 'List %s unknown' , $unsub_list);
return undef;
......@@ -16497,7 +16497,7 @@ sub do_send_mail {
my $filename = "$authqueue\/$listname".'@'."$robot\_$in{'authkey'}";
 
my $mail ;
unless($mail = new Message({'file'=>$filename,'noxsympato'=>'noxsympato'})) {
unless($mail = Message->new({'file'=>$filename,'noxsympato'=>'noxsympato'})) {
report::reject_report_web('intern','cannot_parse_message',{'file' => $filename},$param->{'action'});
wwslog('info','do_tag_topic_by_sender: cannot parse message %s',$filename);
return undef;
......@@ -16928,7 +16928,7 @@ sub do_blacklist {
sub do_dump_scenario {
wwslog('info', "do_dump_scenario($param->{'list'}), $in{'pname'}");
 
my $scenario = new Scenario ('function' => $in{'pname'},
my $scenario = Scenario->new('function' => $in{'pname'},
'robot' => $robot,
'name' => $list->{'admin'}{$in{'pname'}}{'name'},
'directory' => $list->{'dir'});
......@@ -17753,7 +17753,7 @@ sub new_d_read {
# current list / current shared directory
my $list_name = $list->{'name'};
 
my $document = new SharedDocument ($list, $in{'path'}, $param);
my $document = SharedDocument->new($list, $in{'path'}, $param);
 
unless (defined $document) {
report::reject_report_web('intern','new_document_failed',{'path'=>$in{'path'}},$param->{'action'},$list,$param->{'user'}{'email'},$robot);
......@@ -18076,7 +18076,7 @@ sub do_automatic_lists_request {
wwslog('notice', 'Starting');
# check authorization
my $family;
unless ($family = new Family($in{'family'},$robot)) {
unless ($family = Family->new($in{'family'},$robot)) {
wwslog('err', "Failed to instantiate family %s. This family does not exist.",$in{'family'});
List::send_notify_to_listmaster('automatic_list_creation_failed',$robot,["Failed to instantiate family $in{'family'}. This family does not exist."]);
return undef;
......@@ -18113,10 +18113,10 @@ sub do_automatic_lists {
$listname = $1;
}
 
$list = new List ($listname, $robot);
$list = List->new($listname, $robot);
unless (defined $list) {
## Automatic creation of a mailing list, based on a family
unless ($family = new Family($family_name,$robot)) {
unless ($family = Family->new($family_name,$robot)) {
Log::do_log('err', "Failed to create the dynamic list $listname: family $family_name does not exist.");
List::send_notify_to_listmaster('automatic_list_creation_failed',$robot,["Failed to create the dynamic list $listname: family $family_name does not exist."]);
return undef;
......@@ -18159,7 +18159,7 @@ sub prevent_visibility_bypass {
 
sub purely_closed {
my $action = shift;
my $scenario = new Scenario ('robot' => $robot,
my $scenario = Scenario->new('robot' => $robot,
'directory' => $list->{'dir'},
'file_path' => $list->{'admin'}{$action}{'file_path'},
'options' => undef);
......
......@@ -113,7 +113,7 @@ sub scan_dir_archive {
next unless ($file =~ /^\d+$/);
Log::do_log ('debug',"archive::scan_dir_archive($dir, $month): start parsing message $dir/$month/arctxt/$file");
my $mail = new Message({'file'=>"$dir/$month/arctxt/$file",'noxsympato'=>'noxsympato'});
my $mail = Message->new({'file'=>"$dir/$month/arctxt/$file",'noxsympato'=>'noxsympato'});
unless (defined $mail) {
Log::do_log('err', 'Unable to create Message object %s', $file);
return undef;
......
......@@ -204,7 +204,7 @@ sub ldap_authentication {
## bind in order to have the user's DN
my $param = tools::dup_var($ldap);
my $ds = new LDAPSource($param);
my $ds = LDAPSource->new($param);
unless (defined $ds && ($ldap_anonymous = $ds->connect())) {
Log::do_log('err',"Unable to connect to the LDAP server '%s'", $ldap->{'host'});
......@@ -235,7 +235,7 @@ sub ldap_authentication {
$param->{'ldap_bind_dn'} = $DN[0];
$param->{'ldap_bind_password'} = $pwd;
$ds = new LDAPSource($param);
$ds = LDAPSource->new($param);
unless (defined $ds && ($ldap_passwd = $ds->connect())) {
Log::do_log('err',"Unable to connect to the LDAP server '%s'", $param->{'host'});
......@@ -319,7 +319,7 @@ sub get_email_by_net_id {
my $ldap = @{$Conf::Conf{'auth_services'}{$robot}}[$auth_id];
my $param = tools::dup_var($ldap);
my $ds = new LDAPSource($param);
my $ds = LDAPSource->new($param);
my $ldap_anonymous;
unless (defined $ds && ($ldap_anonymous = $ds->connect())) {
......
......@@ -296,7 +296,7 @@ sub stats {
Log::do_log('debug', 'Commands::stats(%s, %s, %s, %s)', $listname, $robot, $sign_mod, $message);
my $list = new List ($listname, $robot);
my $list = List->new($listname, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $listname},$cmd_line);
Log::do_log('info', 'STATS %s from %s refused, unknown list for robot %s', $listname, $sender,$robot);
......@@ -376,7 +376,7 @@ sub getfile {
Log::do_log('debug', 'Commands::getfile(%s, %s, %s)', $which, $file, $robot);
my $list = new List ($which, $robot);
my $list = List->new($which, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $which},$cmd_line);
Log::do_log('info', 'GET %s %s from %s refused, list unknown for robot %s', $which, $file, $sender, $robot);
......@@ -437,7 +437,7 @@ sub last {
Log::do_log('debug', 'Commands::last(%s, %s)', $which, $robot);
my $list = new List ($which,$robot);
my $list = List->new($which,$robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $which},$cmd_line);
Log::do_log('info', 'LAST %s from %s refused, list unknown for robot %s', $which, $sender, $robot);
......@@ -490,7 +490,7 @@ sub index {
Log::do_log('debug', 'Commands::index(%s) robot (%s)',$which,$robot);
my $list = new List ($which, $robot);
my $list = List->new($which, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $which},$cmd_line);
Log::do_log('info', 'INDEX %s from %s refused, list unknown for robot %s', $which, $sender,$robot);
......@@ -547,7 +547,7 @@ sub review {
my $sympa = Conf::get_robot_conf($robot, 'sympa');
my $user;
my $list = new List ($listname, $robot);
my $list = List->new($listname, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $listname},$cmd_line);
......@@ -712,7 +712,7 @@ sub subscribe {
## Load the list if not already done, and reject the
## subscription if this list is unknown to us.
my $list = new List ($which, $robot);
my $list = List->new($which, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $which},$cmd_line);
Log::do_log('info', 'SUB %s from %s refused, unknown list for robot %s', $which,$sender,$robot);
......@@ -897,7 +897,7 @@ sub info {
my $sympa = Conf::get_robot_conf($robot, 'sympa');
my $list = new List ($listname, $robot);
my $list = List->new($listname, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $listname},$cmd_line);
Log::do_log('info', 'INFO %s from %s refused, unknown list for robot %s', $listname,$sender,$robot);
......@@ -951,7 +951,7 @@ sub info {
## Set title in the current language
foreach my $p ('subscribe','unsubscribe','send','review') {
my $scenario = new Scenario ('robot' => $robot,
my $scenario = Scenario->new('robot' => $robot,
'directory' => $list->{'dir'},
'file_path' => $list->{'admin'}{$p}{'file_path'}
);
......@@ -1061,7 +1061,7 @@ sub signoff {
return ($success);
}
$list = new List ($which, $robot);
$list = List->new($which, $robot);
## Is this list defined
unless ($list) {
......@@ -1217,7 +1217,7 @@ sub add {
## Load the list if not already done, and reject the
## subscription if this list is unknown to us.
my $list = new List ($which, $robot);
my $list = List->new($which, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $which},$cmd_line);
Log::do_log('info', 'ADD %s %s from %s refused, unknown list for robot %s', $which, $email,$sender,$robot);
......@@ -1363,7 +1363,7 @@ sub invite {
## Load the list if not already done, and reject the
## subscription if this list is unknown to us.
my $list = new List ($which, $robot);
my $list = List->new($which, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $which},$cmd_line);
Log::do_log('info', 'INVITE %s %s from %s refused, unknown list for robot', $which, $email,$sender,$robot);
......@@ -1525,7 +1525,7 @@ sub remind {
my $list;
unless ($listname eq '*') {
$list = new List ($listname, $robot);
$list = List->new($listname, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $which},$cmd_line);
Log::do_log('info', 'REMIND %s from %s refused, unknown list for robot %s', $which, $sender,$robot);
......@@ -1752,7 +1752,7 @@ sub del {
## Load the list if not already done, and reject the
## subscription if this list is unknown to us.
my $list = new List ($which, $robot);
my $list = List->new($which, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $which},$cmd_line);
Log::do_log('info', 'DEL %s %s from %s refused, unknown list for robot %s', $which, $who,$sender,$robot);
......@@ -1933,7 +1933,7 @@ sub set {
## Load the list if not already done, and reject
## if this list is unknown to us.
my $list = new List ($which, $robot);
my $list = List->new($which, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $which},$cmd_line);
......@@ -2027,7 +2027,7 @@ sub distribute {
my $start_time=time; # get the time at the beginning
## Load the list if not already done, and reject the
## subscription if this list is unknown to us.
my $list = new List ($which, $robot);
my $list = List->new($which, $robot);
unless ($list) {
Log::do_log('info', 'DISTRIBUTE %s %s from %s refused, unknown list for robot %s', $which, $key, $sender,$robot);
report::reject_report_msg('user','list_unknown',$sender,{'listname' => $which},$robot,'','');
......@@ -2058,7 +2058,7 @@ sub distribute {
}
## Open and parse the file
my $message = new Message({'file'=>$file});
my $message = Message->new({'file'=>$file});
unless (defined $message) {
Log::do_log('err', 'Commands::distribute(): Unable to create Message object %s', $file);
report::reject_report_msg('user','unfound_message',$sender,{'listname' => $name,'key'=> $key},$robot,'',$list);
......@@ -2166,7 +2166,7 @@ sub confirm {
return 'wrong_auth';
}
my $message = new Message ({'file'=>$file});
my $message = Message->new({'file'=>$file});
unless (defined $message) {
Log::do_log('err', 'Commands::confirm(): Unable to create Message object %s', $file);
report::reject_report_msg('user','wrong_format_message',$sender,{'key'=> $key},$robot,'','');
......@@ -2325,7 +2325,7 @@ sub reject {
my $modqueue = Conf::get_robot_conf($robot,'queuemod');
## Load the list if not already done, and reject the
## subscription if this list is unknown to us.
my $list = new List ($which, $robot);
my $list = List->new($which, $robot);
unless ($list) {
Log::do_log('info', 'REJECT %s %s from %s refused, unknown list for robot %s', $which, $key, $sender,$robot);
......@@ -2432,7 +2432,7 @@ sub modindex {
$name =~ y/A-Z/a-z/;
my $list = new List ($name, $robot);
my $list = List->new($name, $robot);
unless ($list) {
report::reject_report_cmd('user','no_existing_list',{'listname' => $name},$cmd_line);
Log::do_log('info', 'MODINDEX %s from %s refused, unknown list for robot %s', $name, $sender, $robot);
......@@ -2463,7 +2463,7 @@ sub modindex {
next if (-d "$modqueue/$i");
$i=~/\_(.+)$/;
$curlist = new List ($`,$robot);
$curlist = List->new($`,$robot);
if ($curlist) {
# list loaded
if (exists $curlist->{'admin'}{'clean_delay_queuemod'}){
......@@ -2551,7 +2551,7 @@ sub which {
## Subscriptions
my $data;
foreach my $list (List::get_which ($sender,$robot,'member')){
## wwsympa : my $list = new List ($l);
## wwsympa : my $list = List->new($l);
## next unless (defined $list);
$listname = $list->{'name'};
......
......@@ -964,7 +964,7 @@ sub _load_auth {
$cas_param->{'proxyValidatePath'} = $current_paragraph->{'proxy_validate_path'}
if (defined $current_paragraph->{'proxy_validate_path'});
$current_paragraph->{'cas_server'} = new AuthCAS(%{$cas_param});
$current_paragraph->{'cas_server'} = AuthCAS->new(%{$cas_param});
unless (defined $current_paragraph->{'cas_server'}) {
Log::do_log('err', 'Failed to create CAS object for %s: %s',
$current_paragraph->{'base_url'}, AuthCAS::get_errors());
......
......@@ -124,7 +124,7 @@ sub get_available_families {
## If we can create a Family object with what we find in the family
## directory, then it is worth being added to the list.
foreach my $subdir (grep !/^\.\.?$/, readdir FAMILIES) {
if (my $family = new Family($subdir, $robot)) {
if (my $family = Family->new($subdir, $robot)) {
$families{$subdir} = 1;
}
}
......@@ -354,7 +354,7 @@ sub add_list {
# get list data
open (FIC, '<:raw', "$self->{'dir'}/_new_list.xml");
my $config = new Config_XML(\*FIC);
my $config = Config_XML->new(\*FIC);
close FIC;
unless (defined $config->createHash()) {
push @{$return->{'string_error'}}, "Error in representation data with these xml data";
......@@ -538,7 +538,7 @@ sub modify_list {
# get list data
open (FIC, '<:raw', "$self->{'dir'}/_mod_list.xml");
my $config = new Config_XML(\*FIC);
my $config = Config_XML->new(\*FIC);
close FIC;
unless (defined $config->createHash()) {
push @{$return->{'string_error'}}, "Error in representation data with these xml data";
......@@ -549,7 +549,7 @@ sub modify_list {
#getting list
my $list;
unless ($list = new List($hash_list->{'config'}{'listname'}, $self->{'robot'})) {
unless ($list = List->new($hash_list->{'config'}{'listname'}, $self->{'robot'})) {
push @{$return->{'string_error'}}, "The list $hash_list->{'config'}{'listname'} does not exist.";
return $return;
}
......@@ -914,12 +914,12 @@ sub instantiate {
## EACH FAMILY LIST
foreach my $listname (@{$self->{'list_to_generate'}}) {
my $list = new List($listname, $self->{'robot'});
my $list = List->new($listname, $self->{'robot'});
## get data from list XML file. Stored into $config (class Config_XML).
my $xml_fh;
open $xml_fh, '<:raw', "$self->{'dir'}"."/".$listname.".xml";
my $config = new Config_XML($xml_fh);
my $config = Config_XML->new($xml_fh);
close $xml_fh;
unless (defined $config->createHash()) {
push (@{$self->{'errors'}{'create_hash'}},"$self->{'dir'}/$listname.xml");
......@@ -1031,7 +1031,7 @@ sub instantiate {
## PREVIOUS LIST LEFT
foreach my $l (keys %{$previous_family_lists}) {
my $list;
unless ($list = new List ($l,$self->{'robot'})) {
unless ($list = List->new($l,$self->{'robot'})) {
push (@{$self->{'errors'}{'previous_list'}},$l);
next;
}
......@@ -1057,7 +1057,7 @@ sub instantiate {
## get data from list xml file
my $xml_fh;
open $xml_fh, '<:raw', "$list->{'dir'}/instance.xml";
my $config = new Config_XML($xml_fh);
my $config = Config_XML->new($xml_fh);
close $xml_fh;
unless (defined $config->createHash()) {
push (@{$self->{'errors'}{'create_hash'}},"$list->{'dir'}/instance.xml");
......@@ -2884,7 +2884,7 @@ sub create_automatic_list {
Log::do_log('err', "Failed to add a dynamic list to the family %s : %s", $self->{'name'}, join(';', @{$details}));
return undef;
}
my $list = new List ($listname, $self->{'robot'});
my $list = List->new($listname, $self->{'robot'});
unless (defined $list) {
Log::do_log('err', 'sympa::DoFile() : dynamic list %s could not be created',$listname);
return undef;
......
......@@ -63,7 +63,7 @@ sub get_https{
my $ssl_socket;
$ssl_socket = new IO::Socket::SSL(SSL_use_cert => 1,
$ssl_socket = IO::Socket::SSL->new(SSL_use_cert => 1,
SSL_verify_mode => 0x01,
SSL_cert_file => $client_cert,
SSL_key_file => $client_key,
......@@ -144,7 +144,7 @@ sub get_https2{
my $ssl_socket;
$ssl_socket = new IO::Socket::SSL(SSL_use_cert => 0,
$ssl_socket = IO::Socket::SSL->new(SSL_use_cert => 0,
SSL_verify_mode => 0x01,
SSL_ca_file => $trusted_ca_file,
SSL_ca_path => $trusted_ca_path,
......
......@@ -1221,8 +1221,8 @@ sub get_family {
$family_name = $self->{'admin'}{'family_name'};
my $family;
unless ($family = new Family($family_name,$robot) ) {
Log::do_log('err', 'List::get_family(%s) : new Family(%s) impossible', $self->{'name'},$family_name);
unless ($family = Family->new($family_name,$robot) ) {
Log::do_log('err', 'List::get_family(%s) : Family->new(%s) impossible', $self->{'name'},$family_name);
return undef;
}
......@@ -2523,7 +2523,7 @@ sub send_msg {
my $notice_msg = $saved_msg->dup;
$notice_msg->bodyhandle(undef);
$notice_msg->parts([]);
$new_message = new Message({'mimeentity' => $notice_msg});
$new_message = Message->new({'mimeentity' => $notice_msg});
##Prepare message for txt reception mode
}elsif($array_name eq 'tabrcpt_txt'){
......@@ -2537,7 +2537,7 @@ sub send_msg {
if (defined $new_msg) {
$txt_msg = $new_msg;
}
$new_message = new Message({'mimeentity' => $txt_msg});
$new_message = Message->new({'mimeentity' => $txt_msg});
##Prepare message for html reception mode
}elsif($array_name eq 'tabrcpt_html'){
......@@ -2550,7 +2550,7 @@ sub send_msg {
if (defined $new_msg) {
$html_msg = $new_msg;
}
$new_message = new Message({'mimeentity' => $html_msg});
$new_message = Message->new({'mimeentity' => $html_msg});
##Prepare message for urlize reception mode
}elsif($array_name eq 'tabrcpt_url'){
......@@ -2595,7 +2595,7 @@ sub send_msg {
if (defined $new_msg) {
$url_msg = $new_msg;
}
$new_message = new Message({'mimeentity' => $url_msg});
$new_message = Message->new({'mimeentity' => $url_msg});
}else {
Log::do_log('err', "Unknown variable/reception mode $array_name");
return undef;
......@@ -3057,7 +3057,7 @@ sub archive_send_last {
return unless ($self->is_archived());
my $dir = $self->{'dir'}.'/archives' ;
my $mail = new Message({'file' => "$dir/last_message",'noxsympato'=>'noxsympato'});
my $mail = Message->new({'file' => "$dir/last_message",'noxsympato'=>'noxsympato'});
unless (defined $mail) {
Log::do_log('err', 'Unable to create Message object %s', "$dir/last_message");
return undef;
......@@ -3212,7 +3212,7 @@ sub send_notify_to_listmaster {
if($operation eq 'automatic_bounce_management') {
## Automatic action done on bouncing adresses