[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.15,1.16

Ambrose Li acli at users.sourceforge.net
Fri Feb 13 02:49:07 CET 2004


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

Modified Files:
	text-extract2.pl 
Log Message:
Don't mindlessly spew out 40 lines of text in a warning message if we get
too confused.  Just say we are too confused.


Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** text-extract2.pl	13 Feb 2004 01:27:03 -0000	1.15
--- text-extract2.pl	13 Feb 2004 01:48:58 -0000	1.16
***************
*** 25,28 ****
--- 25,29 ----
  use vars qw( $debug_dump_only_p );
  use vars qw( $pedantic_p );
+ use vars qw( $fatal_p );
  
  ###############################################################################
***************
*** 86,91 ****
      }
      if ($s =~ /\S/s) { # should never happen
! 	warn "Warning: Strange attribute syntax"
! 		. (defined $lc? " near line $lc": '') . ": $s\n";
      }
      return \%attr;
--- 87,99 ----
      }
      if ($s =~ /\S/s) { # should never happen
! 	if ($s =~ /^([^\n]*)\n/s) { # this is even worse
! 	    warn "Error: Completely confused while extracting attributes"
! 		    . (defined $lc? " near line $lc": '') . ": $1\n";
! 	    warn "Error: " . (scalar split(/\n/, $s) - 1) . " more line(s) not shown.\n";
! 	    $fatal_p = 1;
! 	} else {
! 	    warn "Warning: Strange attribute syntax"
! 		    . (defined $lc? " near line $lc": '') . ": $s\n";
! 	}
      }
      return \%attr;
***************
*** 296,297 ****
--- 304,306 ----
  close INPUT;
  
+ exit(-1) if $fatal_p;





More information about the Koha-cvs mailing list