Package: wine
Version: 0.9.51-2

Just FYI, building wine with perl 5.10 installed stops when
generating the manual pages with c2man.pl. That's because
the latter contains obscure syntax in several places.
It boils down to:

### perl 5.8
$ perl -Mstrict -e 'my $aref = [ qw/foo bar/ ]; print [EMAIL PROTECTED], "\n";'
foo

### perl 5.10
perl -Mstrict -e 'my $aref = [ qw/foo bar/ ]; print [EMAIL PROTECTED], "\n";'
Can't use string ("2") as an ARRAY ref while "strict refs" in use at -e line 1.

The "correct " idiom for the first element in the array referenced by $aref
is simply

$aref->[0]

Patch attached (hope I found all occurences).

Cheers, Roderich
--- wine-0.9.51-ORIG/tools/c2man.pl	2007-12-14 17:35:21.000000000 +0100
+++ wine-0.9.51/tools/c2man.pl	2007-12-26 12:39:22.000000000 +0100
@@ -627,7 +627,7 @@
 
   # When the function is exported twice we have the second name below the first
   # (you see this a lot in ntdll, but also in some other places).
-  my $first_line = [EMAIL PROTECTED]>{TEXT}}}[1];
+  my $first_line = $comment->{TEXT}[1];
 
   if ( $first_line =~ /^(@|[A-Za-z0-9_]+) +(\(|\[)([A-Za-z0-9_]+)\.(([0-9]+)|@)(\)|\])$/ )
   {
@@ -642,14 +642,14 @@
       my $alt_export = @{$spec_details->{EXPORTS}}[$alt_index];
       @$alt_export[4] |= $FLAG_DOCUMENTED;
       $spec_details->{NUM_DOCS}++;
-      [EMAIL PROTECTED]>{TEXT}}}[1] = "";
+      $comment->{TEXT}[1] = "";
     }
   }
 
   if (@{$spec_details->{CURRENT_EXTRA}})
   {
     # We have an extra comment that might be related to this one
-    my $current_comment = [EMAIL PROTECTED]>{CURRENT_EXTRA}}}[0];
+    my $current_comment = $spec_details->{CURRENT_EXTRA}[0];
     my $current_name = $current_comment->{COMMENT_NAME};
     if ($comment->{COMMENT_NAME} =~ /^$current_name/ && $comment->{COMMENT_NAME} ne $current_name)
     {
@@ -986,7 +986,7 @@
 
   if (@{$spec_details->{CURRENT_EXTRA}})
   {
-    my $current_comment = [EMAIL PROTECTED]>{CURRENT_EXTRA}}}[0];
+    my $current_comment = $spec_details->{CURRENT_EXTRA}[0];
 
     if ($opt_verbose > 0)
     {
@@ -1072,7 +1072,7 @@
       if (@{$spec_details->{CURRENT_EXTRA}})
       {
         # We have an unwritten extra comment, write it
-        my $current_comment = [EMAIL PROTECTED]>{CURRENT_EXTRA}}}[0];
+        my $current_comment = $spec_details->{CURRENT_EXTRA}[0];
         process_extra_comment($current_comment);
         @{$spec_details->{CURRENT_EXTRA}} = ();
        }
@@ -1468,7 +1468,7 @@
   my $biggest_length = 0;
   for(my $i=0; $i < @{$comment->{PROTOTYPE}}; $i++)
   {
-    my $line = [EMAIL PROTECTED]>{PROTOTYPE}}}[$i];
+    my $line = $comment->{PROTOTYPE}[$i];
     if ($line =~ /(.+?)([A-Za-z_][A-Za-z_0-9]*)$/)
     {
       my $length = length $1;
@@ -1482,19 +1482,19 @@
   # Now pad the string with blanks
   for(my $i=0; $i < @{$comment->{PROTOTYPE}}; $i++)
   {
-    my $line = [EMAIL PROTECTED]>{PROTOTYPE}}}[$i];
+    my $line = $comment->{PROTOTYPE}[$i];
     if ($line =~ /(.+?)([A-Za-z_][A-Za-z_0-9]*)$/)
     {
       my $pad_len = $biggest_length - length $1;
       my $padding = " " x ($pad_len);
-      [EMAIL PROTECTED]>{PROTOTYPE}}}[$i] = $1.$padding.$2;
+      $comment->{PROTOTYPE}[$i] = $1.$padding.$2;
     }
   }
 
   for(my $i=0; $i < @{$comment->{PROTOTYPE}}; $i++)
   {
     # Format the parameter name
-    my $line = [EMAIL PROTECTED]>{PROTOTYPE}}}[$i];
+    my $line = $comment->{PROTOTYPE}[$i];
     my $comma = ($i == @{$comment->{PROTOTYPE}}-1) ? "" : ",";
     $line =~ s/(.+?)([A-Za-z_][A-Za-z_0-9]*)$/  $fmt[0]$1$fmt[2]$2$fmt[3]$comma$fmt[1]/;
     print OUTPUT $line;

Reply via email to