koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.2,1.3 text-extra


From: Ambrose Li
Subject: [Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.2,1.3 text-extract2.pl,1.35,1.36
Date: Mon, 16 Feb 2004 15:50:58 -0800

Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6213

Modified Files:
        TmplTokenizer.pm text-extract2.pl 
Log Message:
Avoid direct accessing of variables inside the module


Index: TmplTokenizer.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplTokenizer.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** TmplTokenizer.pm    16 Feb 2004 23:46:34 -0000      1.2
--- TmplTokenizer.pm    16 Feb 2004 23:50:56 -0000      1.3
***************
*** 266,269 ****
--- 266,276 ----
  
###############################################################################
  
+ # Other easy functions
+ 
+ sub blank_p ($) {
+     my($s) = @_;
+     return $s =~ /^(?:\s|\&nbsp$re_end_entity|$re_tmpl_var)*$/os;
+ }
+ 
  sub trim ($) {
      my($s) = @_;

Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** text-extract2.pl    16 Feb 2004 23:46:34 -0000      1.35
--- text-extract2.pl    16 Feb 2004 23:50:56 -0000      1.36
***************
*** 28,32 ****
  sub debug_dump (*) { # for testing only
      my($h) = @_;
!     print "re_tag_compat is /$TmplTokenizer::re_tag_compat/\n";
      for (;;) {
        my $s = TmplTokenizer::next_token $h;
--- 28,32 ----
  sub debug_dump (*) { # for testing only
      my($h) = @_;
!     print "re_tag_compat is /", TmplTokenizer::re_tag(1), "/\n";
      for (;;) {
        my $s = TmplTokenizer::next_token $h;
***************
*** 80,84 ****
      for my $t (keys %text) {
        printf "%s\n", $t
!           unless $t =~ 
/^(?:\s|\&nbsp$TmplTokenizer::re_end_entity|$TmplTokenizer::re_tmpl_var)*$/os 
|| $t =~ /^\d+$/;
      }
  }
--- 80,84 ----
      for my $t (keys %text) {
        printf "%s\n", $t
!           unless TmplTokenizer::blank_p($t) || $t =~ /^\d+$/;
      }
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]