@@ -637,7 +637,7 @@ sub initialize {
637637 # by this module or sub-module (unless specified in an option)
638638 $self -> {nodefault } = ();
639639
640- print " Call treat_options\n " if $self -> { options }{ ' debug' } ;
640+ print " Call treat_options\n " if $self -> debug;
641641 $self -> treat_options;
642642
643643 # Clear cache
@@ -1338,7 +1338,7 @@ sub treat_tag {
13381338 my $line = &{ $tag_types [$type ]-> {f_translate } }( $self , @lines );
13391339 print wrap_mod( " po4a::xml::treat_tag" , " %s : type=%s <%s%s%s%s%s >" ,
13401340 $lines [1], $type , $match1 , $space1 , $line , $space2 , $match2 )
1341- if $self -> { options }{ ' debug' } ;
1341+ if $self -> debug;
13421342 $self -> pushline( " <" . $match1 . $space1 . $line . $space2 . $match2 . " >" );
13431343 return $eof ;
13441344}
@@ -1463,7 +1463,7 @@ sub treat_attributes {
14631463 ),
14641464 $ref , $value ,
14651465 $self -> get_path . $name
1466- ) if $self -> { options }{ ' debug' } ;
1466+ ) if $self -> debug;
14671467 $text .= $value ;
14681468 }
14691469 $text .= $quot ;
@@ -1603,7 +1603,7 @@ sub get_translate_options {
16031603 " %s : translation option='%s '.\n *** the original translation option is overridden here since parent path='%s ' is untranslated,"
16041604 ),
16051605 $path , $options , $ppath
1606- ) if $self -> { options }{ ' debug' } ;
1606+ ) if $self -> debug;
16071607 }
16081608 }
16091609
@@ -1616,14 +1616,14 @@ sub get_translate_options {
16161616 " po4a::xml::get_translate_options" ,
16171617 dgettext( " po4a" , " %s : foldattributes setting ignored since '%s ' is not inline tag" ),
16181618 $path , $tag
1619- ) if $self -> { options }{ ' debug' } ;
1619+ ) if $self -> debug;
16201620 }
16211621
16221622 $translate_options_cache {$path } = $options ;
16231623
16241624 # print "option($path)=".$translate_options_cache{$path}." (new)\n";
16251625
1626- # print wrap_mod("po4a::xml::get_translate_options", dgettext ("po4a", "%s: options: '%s'"), $path, $options) if $self->{options}{' debug'} ;
1626+ # print wrap_mod("po4a::xml::get_translate_options", dgettext ("po4a", "%s: options: '%s'"), $path, $options) if $self->debug;
16271627 return $options ;
16281628}
16291629
@@ -1694,7 +1694,7 @@ sub treat_content {
16941694 # input stream and save its content to @comments for use by
16951695 # translate_paragraph.
16961696 print wrap_mod( " po4a::xml::treat_content" , " %s : type='%s '" , $paragraph [1], $type )
1697- if $self -> { options }{ ' debug' } ;
1697+ if $self -> debug;
16981698 ( $eof , @text ) = $self -> extract_tag( $type , 1 );
16991699
17001700 # Add "\0" to mark end of each separate comment
@@ -2029,7 +2029,7 @@ sub translate_paragraph {
20292029 " po4a::xml::translate_paragraph" ,
20302030 " %s : path='%s ', translation option='%s '" ,
20312031 $paragraph [1], $self -> get_path, $translate
2032- ) if $self -> { options }{ ' debug' } ;
2032+ ) if $self -> debug;
20332033 $self -> pushline(
20342034 $self -> found_string(
20352035 $para ,
@@ -2048,7 +2048,7 @@ sub translate_paragraph {
20482048 " po4a::xml::translate_paragraph" ,
20492049 " %s : path='%s ', translation option='%s ' (no translation)" ,
20502050 $paragraph [1], $self -> get_path, $translate
2051- ) if $self -> { options }{ ' debug' } ;
2051+ ) if $self -> debug;
20522052 $self -> pushline($para );
20532053 }
20542054 }
@@ -2315,7 +2315,7 @@ sub treat_options {
23152315 # -- XML tags in these may specify options: wWip
23162316 # Extraction of XML content can be one of "inline", "break", "placeholder", or "customtag".
23172317 # -- XML tags in these must not specify options
2318- if ( $self -> { options }{ ' debug' } ) {
2318+ if ( $self -> debug ) {
23192319 foreach my $tagtype (qw( translated untranslated) ) {
23202320 foreach my $tag ( sort keys %{ $self -> {$tagtype } } ) {
23212321 print
0 commit comments