]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/shared/Arc/Archive.pm
made perl 5.005 compilant
[selfforum.git] / selfforum-cgi / shared / Arc / Archive.pm
index 8b4daea2f752e177f9a55bd0e1d8484f15182f5e..9e3ccb911d87351814b3f1db4fcfc6cda35d9c5c 100644 (file)
@@ -4,13 +4,17 @@ package Arc::Archive;
 #                                                                              #
 # File:        shared/Arc/Archive.pm                                           #
 #                                                                              #
-# Authors:     Andre Malo       <nd@o3media.de>, 2001-04-29                    #
+# Authors:     Andre Malo       <nd@o3media.de>, 2001-06-16                    #
 #                                                                              #
 # Description: Severance of Threads and archiving                              #
 #                                                                              #
 ################################################################################
 
 use strict;
+use vars qw(
+  @EXPORT
+  $VERSION
+);
 
 use Arc::Test;
 use Lock          qw(:ALL);
@@ -28,12 +32,18 @@ use Posting::Cache;
 
 use XML::DOM;
 
+################################################################################
+#
+# Version check
+#
+$VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+
 ################################################################################
 #
 # Export
 #
 use base qw(Exporter);
-@Arc::Archive::EXPORT = qw(cut_tail);
+@EXPORT = qw(cut_tail);
 
 ### sub cut_tail ($) ###########################################################
 #
@@ -171,9 +181,9 @@ sub cut_tail ($) {
                       my $monthpath = $monthdir . '/';
                       my $file = $monthpath . "t$tid.xml";
 
-                      mkdir $yeardir unless (-d $yeardir);
+                      mkdir $yeardir, 0777 unless (-d $yeardir);
                       if (-d $yeardir) {
-                        mkdir $monthdir unless (-d $monthdir);
+                        mkdir $monthdir, 0777 unless (-d $monthdir);
                         if (-d $monthdir) {
                           save_file (
                             $file,
@@ -220,7 +230,7 @@ sub cut_tail ($) {
   \%failed;
 }
 
-# keep require happy
+# keep 'require' happy
 1;
 
 #

patrick-canterino.de