develooper Front page | perl.perl5.porters | Postings from October 2011

[perl #101508] Using flags causes Data::Dumper to die instead of warn

From:
H . Merijn Brand
Date:
October 17, 2011 03:19
Subject:
[perl #101508] Using flags causes Data::Dumper to die instead of warn
Message ID:
rt-3.6.HEAD-31297-1318839436-1849.101508-75-0@perl.org
# New Ticket Created by  H. Merijn Brand 
# Please include the string:  [perl #101508]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=101508 >



This is a bug report for perl from h.m.brand@xs4all.nl,
generated with the help of perlbug 1.39 running under perl 5.12.2.


-----------------------------------------------------------------
[Please describe your issue here]

--8<---
use strict;
use Data::Dumper;

$Data::Dumper::Deparse = 1;
$Data::Dumper::Useqq   = 1;

print Dumper {
    SV  => 1,
    GLB => *STDERR,
    IO  => *{$::{STDERR}}{IO},
    FMT => *{$::{STDOUT}}{FORMAT},
    };
-->8---

Without either of these two flags, Dumper will warn with:

cannot handle ref type 15 at /pro/lib/perl5/5.14.1/x86_64-linux-ld/Data/Dumper.pm line 190.
$VAR1 = {
          'IO' => bless( , 'IO::File' ),
          'GLB' => *::STDERR,
          'FMT' => undef,
          'SV' => 1
        };

With either of these two flags, it will die:

Can't handle IO type. at ../bisect-test.pl line 14

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=medium
    module=Data::Dumper
---
Site configuration information for perl 5.12.2:

Configured by merijn at Fri Oct 29 11:43:59 CEST 2010.

Summary of my perl5 (revision 5 version 12 subversion 2) configuration:
   
  Platform:
    osname=linux, osvers=2.6.31.14-0.4-desktop, archname=x86_64-linux-ld
    uname='linux sv03 2.6.31.14-0.4-desktop #1 smp preempt 2010-10-25 08:45:30 +0200 x86_64 x86_64 x86_64 gnulinux '
    config_args='-Duse64bitall -Duselongdouble -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=define
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='ccache cc', ccflags ='-fPIC -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fPIC -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include'
    ccversion='', gccversion='4.4.1 [gcc-4_4-branch revision 150839]', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
    alignbytes=16, prototype=define
  Linker and Libraries:
    ld='ccache cc', ldflags ='-L/pro/local/lib -fstack-protector'
    libpth=/pro/local/lib /lib /usr/lib /usr/local/lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.10.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.10.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/pro/local/lib -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.12.2:
    /pro/lib/perl5/site_perl/5.12.2/x86_64-linux-ld
    /pro/lib/perl5/site_perl/5.12.2
    /pro/lib/perl5/5.12.2/x86_64-linux-ld
    /pro/lib/perl5/5.12.2
    .

---
Environment for perl 5.12.2:
    HOME=/home/merijn
    LANG=en_US.utf8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=.:/home/merijn/bin/private:/home/merijn/bin:/pro/local/bin:/pro/bin:/usr/local/bin:/usr/lib64/mpi/gcc/openmpi/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/NX/bin:/opt/gnome/bin:/usr/lib/qt3/bin:/usr/sbin:/pro/local/sbin:/sbin:/opt/cxoffice/bin:/pro/to/bin:/usr/local/sbin:/pro/3gl/CPAN/bin:/home/merijn/cxoffice/bin
    PERL_BADLANG (unset)
    SHELL=/pro/bin/tcsh




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About