]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/shared/Template.pm
added error message for xml-parse-error.
[selfforum.git] / selfforum-cgi / shared / Template.pm
index ece7eaa2f132bf6a0e79f08549c6179c65f32fb9..4e19eb24d3f21e73bafa8aecb81e573c1d24eabc 100644 (file)
@@ -4,17 +4,23 @@ package Template;
 #                                                                              #
 # File:        shared/Template.pm                                              #
 #                                                                              #
 #                                                                              #
 # File:        shared/Template.pm                                              #
 #                                                                              #
-# Authors:     AndrĂ© Malo <nd@o3media.de>, 2001-04-12                          #
-#              Frank Schoenmann <fs@tower.de>, 2001-06-04                      #
+# Authors:     AndrĂ© Malo       <nd@o3media.de>, 2001-06-16                    #
+#              Frank Schoenmann <fs@tower.de>,   2001-06-04                    #
 #                                                                              #
 # Description: Handle XML based HTML-Templates                                 #
 #                                                                              #
 ################################################################################
 
 use strict;
 #                                                                              #
 # Description: Handle XML based HTML-Templates                                 #
 #                                                                              #
 ################################################################################
 
 use strict;
-use vars qw($xml_dom_used);
+use vars qw(
+  $xml_dom_used
+  $VERSION
+);
 
 
-use Carp qw(croak confess);
+use Carp qw(
+  croak
+  confess
+);
 
 BEGIN {
   $xml_dom_used = eval q[
 
 BEGIN {
   $xml_dom_used = eval q[
@@ -24,6 +30,13 @@ BEGIN {
   ];
 }
 
   ];
 }
 
+################################################################################
+#
+# Version check
+#
+$VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+
+
 ### sub new ####################################################################
 #
 # constructor
 ### sub new ####################################################################
 #
 # constructor
@@ -178,7 +191,8 @@ sub scrap {
   );
 
   # remove newlines
   );
 
   # remove newlines
-  $scrap =~ s/\n|\r\n|\n\r|\r//g if ($no_nl);
+  #
+  $scrap =~ s/\015\012|\015|\012//g if ($no_nl);
 
   # return
   \$scrap;
 
   # return
   \$scrap;
@@ -345,9 +359,9 @@ sub parse_if {
   return;
 }
 
   return;
 }
 
-# keeping 'require' happy
+# keep 'require' happy
 1;
 
 #
 #
 1;
 
 #
 #
-### end of Template ############################################################
+### end of Template ############################################################
\ No newline at end of file

patrick-canterino.de