# New Ticket Created by  Steve Peters 
# Please include the string:  [perl #43031]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=43031 >


Creating new instance variables after a new is never good.  The attached
patch is needed before things can start to be moved around.

Steve Peters
[EMAIL PROTECTED]

Index: lib/Parrot/Ops2c/Utils.pm
===================================================================
--- lib/Parrot/Ops2c/Utils.pm   (revision 18619)
+++ lib/Parrot/Ops2c/Utils.pm   (working copy)
@@ -194,6 +194,8 @@

     $argsref->{preamble}  = $preamble;
     $argsref->{init_func} = $init_func;
+    $argsref->{bs}   = "$argsref->{base}$argsref->{suffix}_";
+    $argsref->{opsarraytype} = $argsref->{trans}->opsarraytype();

     $argsref->{flag} = $flagref;
     return bless $argsref, $class;
@@ -421,8 +423,6 @@
 sub print_c_source_top {
     my $self = shift;
     $self->{defines}      = $self->{trans}->defines();          # Invoked as:  
${defines}
-    $self->{bs}           = "$self->{base}$self->{suffix}_";    # Also invoked 
as ${bs}
-    $self->{opsarraytype} = $self->{trans}->opsarraytype();

     ##### BEGIN printing to $SOURCE #####
     open my $SOURCE, '>', $self->{source}

Reply via email to