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


   I find the following patch necessary to build PMCs in r20605.  I'm
using Perl 5.8.1, so it may be that newer Perls autovivify differently.
This changed since r20358, but I'm not sure it's worth tracking down.
If I hear no objections, I will go ahead and commit this.

                                        -- Bob Rogers
                                           http://rgrjr.dyndns.org/

* lib/Parrot/Pmc2c/MethodEmitter.pm:
   + $decs is not always defined, at least in older Perls.

Diffs between last version checked in and current workfile(s):

Index: lib/Parrot/Pmc2c/MethodEmitter.pm
===================================================================
--- lib/Parrot/Pmc2c/MethodEmitter.pm   (revision 20605)
+++ lib/Parrot/Pmc2c/MethodEmitter.pm   (working copy)
@@ -107,7 +107,7 @@
     $args =~ s/(\w+)\s*(\*)\s*/$1 $2/g;
 
     my ( $decorators, $export, $extern, $newl, $semi, $interp, $pmcvar );
-    $decorators = length @$decs ? join $/ => @$decs, '' : '';
+    $decorators = $decs && length @$decs ? join $/ => @$decs, '' : '';
     if ($for_header eq 'HEADER') {
         $export = $pmc->is_dynamic ? 'PARROT_DYNEXT_EXPORT ' : 'PARROT_API ';
         $extern = "extern ";

End of diffs.

Reply via email to