From: "Will Coleda via RT" <[EMAIL PROTECTED]>
   Date: Fri, 06 Jun 2008 07:31:37 -0700

   . . .

   I assume this got resolved but not reflected on the ticket?

AFAICS, the decorators slot of this object is now always an arrayref, so
it can't bomb as it did before.  But the code still has two problems:
(1) "length @$decs" is always true, even for an empty array; and (2) if
$decs is empty, both branches of the conditional compute the same thing
(an empty string).  So I committed the following simplification,
preserving the assumption that $self->decorators always returns an
arrayref.

   So *that* oughta resolve it.

                                        -- Bob

------------------------------------------------------------------------
2008-06-07 23:04:22:
  revision: 28173;  author: rgrjr
  * lib/Parrot/Pmc2c/MethodEmitter.pm:
     + (decl):  Remove broken (and pointless) optimization.
  => /trunk/lib/Parrot/Pmc2c/MethodEmitter.pm:  action: M

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

Reply via email to