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


---
osname= cygwin
osvers= 1.5.25(0.15642)
arch=   cygwin-thread-multi-64int
cc=     gcc
---
Flags:
           category=library
           severity=low
           ack=no
---
All platforms, all Perls older than 5.10, just cygwin 5.8.8 passes.
Detected by cotto, fixed in t/native_pbc/header.t in r31088.


$ perl5.8.4 t/native_pbc/header.t
1..9
Operation `eq': no method found,
         left argument in overloaded package File::Temp,
         right argument has no overloaded magic at lib/Parrot/Test.pm 
line 312.
# Looks like your test died before it could output anything.

Fix in the test:
   my $out_f = File::Temp->new( UNLINK => 1, SUFFIX => '.pbc' );
   ...
   Parrot::Test::run_command
     (
       qq{$parrot $args -o $out_f $tmppasm},
-       CD => $path_to_parrot,
-       STDOUT => $out_f,
-       STDERR => $out_f,
+       CD => $path_to_parrot
     );
   my $pbc = slurp_file($out_f);

Problematic part in lib/Parrot/Test.pm:
     while ( my ( $key, $value ) = each %options ) {
         $key =~ m/^STD(OUT|ERR)$/
             or die "I don't know how to redirect '$key' yet!";
         $value = File::Spec->devnull()
             if $value eq '/dev/null'; # TODO filehandle `eq' string 
will fail
     }                                 # on older perls

A invocation of Parrot::Test::run_command with an filehandle for STDOUT 
as in t/native_pbc/header.t will lead to the error.

TODO:
Check for filehandle before comparing with eq to '/dev/null'

---
Summary of my parrot 0.7.0 (r0) configuration:
     configdate='Wed Aug 20 18:34:46 2008 GMT'
     Platform:
       osname=cygwin, archname=cygwin-thread-multi-64int
       jitcapable=1, jitarchname=i386-cygwin,
       jitosname=CYGWIN, jitcpuarch=i386
       execcapable=1
       perl=/usr/bin/perl.exe
     Compiler:
       cc='gcc', ccflags='-U__STRICT_ANSI__  -pipe -I/usr/local/include
-DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_MALLOC
-DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE
-DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT
-falign-functions=16 -maccumulate-outgoing-args -W -Wall
-Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment
-Wdisabled-optimization -Wendif-labels -Wextra -Wformat
-Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k
-Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wmissing-braces
-Wno-missing-format-attribute -Wpacked -Wparentheses -Wpointer-arith
-Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare
-Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default
-Wtrigraphs -Wundef -Wunknown-pragmas -Wno-unused -Wwrite-strings
-Wbad-function-cast -Wdeclaration-after-statement
-Wimplicit-function-declaration -Wimplicit-int -Wmain
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull
-DDISABLE_GC_DEBUG=1 -DNDEBUG -O3 -DHAS_GETTEXT',
     Linker and Libraries:
       ld='gcc', ldflags=' -Wl,--enable-auto-import
-Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base ',
       cc_ldflags='',
       libs='-L/usr/local/lib -lcrypt -lgmp -lreadline -lpcre -lglut32
-lglu32 -lopengl32 -lcrypto -lintl'
     Dynamic Linking:
       share_ext='.dll', ld_share_flags='-shared',
       load_ext='.dll', ld_load_flags='-shared'
     Types:
       iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4,
       ptrsize=4, ptr_alignment=1 byteorder=1234,
       nv=double, numvalsize=8, doublesize=8
---
Environment:
               CYGWIN =server
               HOME =/home/rurban
               LANG  (unset)
               LANGUAGE  (unset)
               LD_LIBRARY_PATH  (unset)
               LOGDIR  (unset)
               PATH
=~/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
               SHELL  (unset)

Reply via email to