package Conf;
-use vars qw(@ISA @EXPORT);
-
use XML::DOM;
# ====================================================
# Funktionsexport
# ====================================================
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw(read_script_conf);
+use base qw(Exporter);
+@Conf::EXPORT = qw(read_script_conf);
################################
# sub read_script_conf
use strict;
package Id;
-require 5.000;
#####################
# Funktionsexport
#####################
-require Exporter;
-@Id::ISA = qw(Exporter);
+use base qw(Exporter);
@Id::EXPORT = qw(unique_id);
use vars qw(@table);
# Rueckgabe der ID #
##########################################
-sub unique_id {
+# sub unique_id ################################################
+#
+# composing of an unique ID...
+#
+sub unique_id () {
my $id;
my $ip=$ENV{'REMOTE_ADDR'};
my $rand=int(rand(time()));
$ip = hex(join ('',map {sprintf ('%02X',$_)} split (/\./,$ip)));
- join '',map {to_base64 ($_)} (substr ($time,-9), $port, $ip, $rand, $$);
+ join '',map {to_base64 ($_)} ($time, $port, $ip, $rand, $$);
}
+# sub to_base64 ################################################
+#
+# only converts (max.) 32-bit numbers into a
+# system with base 64
+# its not the RFC base64 format!
+#
sub to_base64 ($) {
my $x = shift;
my $y = $table[$x % 64];
- while ($x = int ($x/64)) {$y = $table[$x % 64] . $y}
+ $y = $table[$x % 64].$y while ($x = int ($x/64));
- # Rueckgabe
$y;
}
package Lock;
-use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS $Timeout $violentTimeout $masterTimeout $iAmMaster);
+use vars qw(@EXPORT_OK %EXPORT_TAGS $Timeout $violentTimeout $masterTimeout $iAmMaster);
# ====================================================
# Funktionsexport
# ====================================================
-require Exporter;
-@ISA = qw(Exporter);
+use base qw(Exporter);
@EXPORT_OK = qw(lock_file unlock_file write_lock_file write_unlock_file
violent_unlock_file set_master_lock release_file);
package Mail;
-use vars qw($mailbox $mailprog @ISA @EXPORT);
+use vars qw($mailbox $mailprog @EXPORT);
# ===================
# Funktionsexport
# ===================
-require Exporter;
-@ISA = qw(Exporter);
+use base qw(Exporter);
@EXPORT = qw(is_mail_address send_mail);
########################################
-package Posting::Handle;
+package Posting::Admin;
################################################################################
# #
-# File: shared/Posting/Handle.pm #
+# File: shared/Posting/Admin.pm #
+# (was: ~Handle.pm) #
# #
# Authors: Frank Schoenmann <fs@tower.de>, 2001-03-13 #
+# Andre Malo <nd@o3media.de>, 2001-03-29 #
# #
-# Description: Allow modifications of postings #
+# Description: Allow administration of postings #
# #
# Todo: * Lock files before modification #
# * Change body in change_posting_body() #
use strict;
-use vars qw(@EXPORT);
use base qw(Exporter);
-@EXPORT = qw(hide_posting recover_posting modify_posting add_user_vote level_vote);
+@Posting::Admin::EXPORT = qw(hide_posting recover_posting modify_posting add_user_vote level_vote);
use Lock qw(:READ);
use Posting::_lib qw(get_message_node save_file get_all_threads
# Let it be true
-1;
+1;
\ No newline at end of file
use strict;
-use vars qw(@EXPORT);
use base qw(Exporter);
# ====================================================
# Funktionsexport
# ====================================================
-@EXPORT = qw(write_posting);
+@Posting::Write::EXPORT = qw(write_posting);
use Encode::Plain; $Encode::Plain::utf8 = 1;
use Encode::Posting;
# ====================================================
# end of Posting::Write
-# ====================================================
+# ====================================================
\ No newline at end of file
package Template::Forum;
-use vars qw(@ISA @EXPORT);
-
use Lock qw(:READ);
use Encode::Plain; $Encode::Plain::utf8 = 1;
use Posting::_lib qw(get_all_threads long_hr_time);
# Funktionsexport
# ====================================================
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw(print_forum_as_HTML);
+use base qw(Exporter);
+@Template::Forum::EXPORT = qw(print_forum_as_HTML);
################################
# sub print_forum_as_HTML
package Template::Posting;
-use vars qw(@ISA @EXPORT);
-
use Encode::Posting;
use Encode::Plain; $Encode::Plain::utf8 = 1;
use Id;
# Funktionsexport
# ====================================================
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw(print_posting_as_HTML message_as_HTML);
+use base qw(Exporter);
+@Template::Posting::EXPORT = qw(print_posting_as_HTML message_as_HTML);
################################
# sub print_posting_as_HTML
package Template::_conf;
-use vars qw(@ISA @EXPORT);
-
# ====================================================
# Funktionsexport
# ====================================================
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw(get_view_params);
+use base qw(Exporter);
+@Template::_conf::EXPORT = qw(get_view_params);
################################
# sub get_view_params
package Template::_query;
-use vars qw(@ISA @EXPORT);
-
# ====================================================
# Funktionsexport
# ====================================================
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw(query_string);
+use base qw(Exporter);
+@Template::_query::EXPORT = qw(query_string);
################################
# sub query_string
package Template::_thread;
-use vars qw(@ISA @EXPORT);
-
use Encode::Plain; $Encode::Plain::utf8 = 1;
use Posting::_lib qw(short_hr_time);
use Template;
# Funktionsexport
# ====================================================
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw(html_thread);
+use base qw(Exporter);
+@Template::_thread::EXPORT = qw(html_thread);
################################
# sub html_thread