[Po4a-commits] po4a/lib/Locale/Po4a TransTractor.pm,1.67,1.68

Martin Quinson mquinson at alioth.debian.org
Sun Jul 24 17:10:10 UTC 2005


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv27307/lib/Locale/Po4a

Modified Files:
	TransTractor.pm 
Log Message:
take care of the porefs option for the Po.pm

Index: TransTractor.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TransTractor.pm,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- TransTractor.pm	30 May 2005 07:05:23 -0000	1.67
+++ TransTractor.pm	24 Jul 2005 17:10:08 -0000	1.68
@@ -326,11 +326,20 @@
     ## Bless ourselves into the desired class and perform any initialization
     bless $self, $class;
     
+    ## initialize the plugin
+    # prevent the plugin from croaking on the options intended for Po.pm
+    $self->{options}{'porefs'} = '';
+    # let the plugin parse the options and such
+    $self->initialize(%options);
+
     ## Create our private data
+    my %po_options;
+    $po_options{'porefs'} = $self->{options}{'porefs'};
+    
     # private data
     $self->{TT}=(); 
     $self->{TT}{po_in}=Locale::Po4a::Po->new();
-    $self->{TT}{po_out}=Locale::Po4a::Po->new();
+    $self->{TT}{po_out}=Locale::Po4a::Po->new(\%po_options);
     # Warning, this is an array of array:
     #  The document is splited on lines, and for each
     #  [0] is the line content, [1] is the reference [2] the type
@@ -348,8 +357,6 @@
     # document isn't in ascii)
     $self->{TT}{utf_mode}=0;
 
-    ## initialize the plugin
-    $self->initialize(%options);
     
     return $self;
 }




More information about the Po4a-commits mailing list