Skip Menu |
Report information
Id: 122753
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: felipe [at] felipegasper.com
Cc:
AdminCc:

Operating System: Linux
PatchStatus: (no value)
Severity: low
Type: docs
Perl Version: 5.14.4
Fixed In: 5.27.7



Date: Wed, 10 Sep 2014 14:21:36 -0500
To: perlbug [...] perl.org
Subject: Docs on destructors are inaccurate
From: felipe [...] felipegasper.com
Download (untitled) / with headers
text/plain 6.5k
This is a bug report for perl from felipe@felipegasper.com, generated with the help of perlbug 1.39 running under perl 5.14.4. ----------------------------------------------------------------- [Please describe your issue here] http://perldoc.perl.org/perlobj.html#Destructors The above describes perl 5.12's behavior of populating $@ on a die() within a DESTROY within an eval {}. Also, it says nothing is written to STDOUT. This behavior has not been the case since 5.14; as of 5.14, $@ is not populated, and a warn() is indeed thrown. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=docs severity=low --- Site configuration information for perl 5.14.4: Configured by cPanel at Thu Jul 10 15:51:11 CDT 2014. Summary of my perl5 (revision 5 version 14 subversion 4) configuration: Platform: osname=linux, osvers=2.6.32-358.23.2.el6.i686, archname=i386-linux-64int uname='linux rpmb-32-centos-6 2.6.32-358.23.2.el6.i686 #1 smp wed oct 16 17:21:31 utc 2013 i686 i686 i386 gnulinux ' config_args='-des -Dusedevel -Darchname=i386-linux-64int -Dcc=/usr/bin/gcc -Dcpp=/usr/bin/cpp -DDEBUGGING=none -Doptimize=-Os -Dusemymalloc=n -Duseshrplib -Duselargefiles=yes -Duseposix=true -Dhint=recommended -Duseperlio=yes -Dccflags=-I/usr/local/cpanel/3rdparty/perl/514/include -L/usr/local/cpanel/3rdparty/perl/514/lib -I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib -DAPPLLIB_EXP="/usr/local/cpanel" -Dcppflags=-I/usr/local/cpanel/3rdparty/perl/514/include -L/usr/local/cpanel/3rdparty/perl/514/lib -I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib -Dldflags=-Wl,-rpath -Wl,/usr/local/cpanel/3rdparty/perl/514/lib -L/usr/local/cpanel/3rdparty/perl/514/lib -L/usr/local/cpanel/3rdparty/lib -Dprefix=/usr/local/cpanel/3rdparty/perl/514 -Dsiteprefix=/opt/cpanel/perl5/514 -Dsitebin=/opt/cpanel/perl5/514/bin -Dsitelib=/opt/cpanel/perl5/514/site_lib -Dusevendorprefix=true -Dvendorbin=/usr/local/cpanel/3rdparty/perl/514/bin -Dvendorprefix=/usr/local/cpanel/3rdparty/perl/514/lib/perl5 -Dvendorlib=/usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib -Dprivlib=/usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4 -Dman1dir=none -Dman3dir=none -Dscriptdir=/usr/local/cpanel/3rdparty/perl/514/bin -Dscriptdirexp=/usr/local/cpanel/3rdparty/perl/514/bin -Dsiteman1dir=none -Dsiteman3dir=none -Dinstallman1dir=none -Dversiononly=no -Dinstallusrbinperl=no -Dcf_by=cPanel -Dmyhostname=localhost -Dperladmin=root@localhost -Dcf_email=support@cpanel.net -Di_dbm=/usr/local/cpanel/3rdparty/include -Di_gdbm=/usr/local/cpanel/3rdparty/include -Di_ndbm=/usr/local/cpanel/3rdparty/include -Ud_dosuid -Uuserelocatableinc -Umad -Uusethreads -Uusemultiplicity -Uusesocks -Uuselongdouble -Ui_db -Aldflags=-L/usr/local/cpanel/3rdparty/perl/514/lib -L/usr/local/cpanel/3rdparty/lib -L/usr/lib -L/lib -lgdbm -Dlocincpth=/usr/local/cpanel/3rdparty/perl/514/include /usr/local/cpanel/3rdparty/include /usr/local/include -Duse64bitint -Uuse64bitall -Acflags=-fPIC -DPIC -m32 -I/usr/local/cpanel/3rdparty/perl/514/include -I/usr/local/cpanel/3rdparty/include -Dlibpth=/usr/local/cpanel/3rdparty/perl/514/lib /usr/local/cpanel/3rdparty/lib /usr/local/lib /lib /usr/lib ' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='/usr/bin/gcc', ccflags ='-I/usr/local/cpanel/3rdparty/perl/514/include -L/usr/local/cpanel/3rdparty/perl/514/lib -I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib -DAPPLLIB_EXP="/usr/local/cpanel" -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-Os', cppflags='-I/usr/local/cpanel/3rdparty/perl/514/include -L/usr/local/cpanel/3rdparty/perl/514/lib -I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib -I/usr/local/cpanel/3rdparty/perl/514/include -L/usr/local/cpanel/3rdparty/perl/514/lib -I/usr/local/cpanel/3rdparty/include -L/usr/local/cpanel/3rdparty/lib -DAPPLLIB_EXP="/usr/local/cpanel" -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-3)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='/usr/bin/gcc', ldflags ='-Wl,-rpath -Wl,/usr/local/cpanel/3rdparty/perl/514/lib -L/usr/local/cpanel/3rdparty/perl/514/lib -L/usr/local/cpanel/3rdparty/lib -L/usr/local/cpanel/3rdparty/perl/514/lib -L/usr/local/cpanel/3rdparty/lib -L/usr/lib -L/lib -lgdbm -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.12.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.12' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4/i386-linux-64int/CORE' cccdlflags='-fPIC', lddlflags='-shared -Os -L/usr/local/cpanel/3rdparty/perl/514/lib -L/usr/local/cpanel/3rdparty/lib -L/usr/lib -L/lib -L/usr/local/lib -fstack-protector' Locally applied patches: cPanel patches cPanel INC path changes Disabled some unstable tests on a kvm build server Cherry pick of 49498ca from p5p (RT 113514) Remove improper use of each() in B::walksymtable (5cc8528c90) --- @INC for perl 5.14.4: /usr/local/cpanel /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4/i386-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib/perl5/5.14.4 /opt/cpanel/perl5/514/site_lib/i386-linux-64int /opt/cpanel/perl5/514/site_lib . --- Environment for perl 5.14.4: HOME=/root LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/root/.opt/bin:/usr/local/cpanel/3rdparty/perl/514/bin:/usr/local/cpanel/3rdparty/bin:/usr/local/cpanel/3rdparty/node/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin PERL5LIB=/usr/local/cpanel PERL_BADLANG (unset) SHELL=/bin/bash
From: Felipe Gasper <felipe [...] felipegasper.com>
To: perlbug-followup [...] perl.org
Date: Wed, 10 Sep 2014 14:23:50 -0500
Subject: Re: [perl #122753] perlbug AutoReply: Docs on destructors are inaccurate
Example script that demonstrates the issue: ========================== #!/usr/bin/perl use strict; use warnings; package Finally; sub new { my ( $class, $todo_cr ) = @_; return bless [$todo_cr], $class; } sub DESTROY { my ($self) = @_; return $self->[0]->(); } #---------------------------------------------------------------------- package main; use strict; use warnings; print "Perl: $^V$/"; eval { do { my $finally = Finally->new( sub { print "die!"; die "haha" } ); }; print "err in: $@"; }; print "err out: $@"; ======================= On 9/10/14 2:21 PM, perlbug-followup@perl.org wrote: Show quoted text
> Greetings, > > This message has been automatically generated in response to the > creation of a perl bug report regarding: > "Docs on destructors are inaccurate". > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [perl #122753]. > > You can view your ticket at > https://rt.perl.org/Ticket/Display.html?id=122753 > > Within the next 24 to 72 hours, your message will be posted to the Perl 5 Porters mailing list. Please be patient! > > Please include the string: > > [perl #122753] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message (please delete unnecessary quotes and text.) > > Thank you, > perlbug-followup@perl.org > > ------------------------------------------------------------------------- > Reply-To: felipe@felipegasper.com > Received: (qmail 26680 invoked by uid 225); 10 Sep 2014 19:21:48 -0000 > Received: (qmail 26676 invoked by alias); 10 Sep 2014 19:21:47 -0000 > Received: from ng1.cptxoffice.net (HELO felipe.dev.cpanel.net) (208.74.121.102) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 10 Sep 2014 12:21:45 -0700 > Received: from root by felipe.dev.cpanel.net with local (Exim 4.84) (envelope-from <felipe@felipegasper.com>) id 1XRnSS-0007OQ-MF for perlbug@perl.org; Wed, 10 Sep 2014 14:21:36 -0500 > X-Spam-Status: No, hits=-5.2 required=8.0 tests=BAYES_00,PERLBUG_CONF,SPF_SOFTFAIL,URIBL_BLOCKED > Date: Wed, 10 Sep 2014 14:21:36 -0500 > To: perlbug@perl.org > Subject: Docs on destructors are inaccurate > X-Virus-Checked: Checked > From felipe@felipegasper.com Wed Sep 10 19:21:48 2014 > X-Spam-Check-BY: la.mx.develooper.com > Delivered-To: rt-perl5@rt.perl.org > Delivered-To: perlbug@perl.org > X-Get-Message-Sender-Via: felipe.dev.cpanel.net: sender_ident via received_protocol == local: root/only user confirmed/virtual account not confirmed > X-Antiabuse: This header was added to track abuse, please include it with any abuse report > X-Antiabuse: Primary Hostname - felipe.dev.cpanel.net > X-Antiabuse: Original Domain - perl.org > X-Antiabuse: Originator/Caller UID/GID - [0 0] / [47 12] > X-Antiabuse: Sender Address Domain - felipegasper.com > From: felipe@felipegasper.com > Message-ID: <5.14.4_28242_1410376799@felipe.dev.cpanel.net> > Return-Path: <felipe@felipegasper.com> > X-RT-Original-Encoding: ascii > content-type: text/plain; charset="utf-8" > X-RT-Interface: Email >
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 847b
On Wed Sep 10 12:21:53 2014, felipe@felipegasper.com wrote: Show quoted text
> > This is a bug report for perl from felipe@felipegasper.com, > generated with the help of perlbug 1.39 running under perl 5.14.4. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > http://perldoc.perl.org/perlobj.html#Destructors > > The above describes perl 5.12's behavior of populating $@ on a die() > within a DESTROY within an eval {}. Also, it says nothing is written > to STDOUT. > > This behavior has not been the case since 5.14; as of 5.14, $@ is not > populated, and a warn() is indeed thrown. >
Other porters: Is the OP's assertion that these docs are out-of-date correct? Felipe: Would you be able to submit a patch pulled against blead? Thank you very much. -- James E Keenan (jkeenan@cpan.org)
To: perlbug-followup [...] perl.org
Date: Fri, 12 Sep 2014 11:31:03 -0500
From: Felipe Gasper <felipe [...] felipegasper.com>
Subject: Re: [perl #122753] Docs on destructors are inaccurate
Download (untitled) / with headers
text/plain 273b
On 9/10/14 8:24 PM, James E Keenan via RT wrote: Show quoted text
> > Other porters: Is the OP's assertion that these docs are out-of-date correct? > > Felipe: Would you be able to submit a patch pulled against blead? >
I can submit, sure … do you mean in this RT, or via GitHub? -F
Subject: Re: [perl #122753] Docs on destructors are inaccurate
From: Victor Efimov <victor [...] vsespb.ru>
Date: Fri, 12 Sep 2014 22:31:44 +0400
CC: Father Chrysostomos via RT <perlbug-followup [...] perl.org>
To: Felipe Gasper <felipe [...] felipegasper.com>
Download (untitled) / with headers
text/plain 425b
duplicate https://rt.perl.org/Public/Bug/Display.html?id=121761 2014-09-12 20:31 GMT+04:00 Felipe Gasper <felipe@felipegasper.com>: Show quoted text
> On 9/10/14 8:24 PM, James E Keenan via RT wrote:
>> >> >> Other porters: Is the OP's assertion that these docs are out-of-date >> correct? >> >> Felipe: Would you be able to submit a patch pulled against blead? >>
> > I can submit, sure … do you mean in this RT, or via GitHub? > > -F
From: Leon Timmermans <fawaka [...] gmail.com>
To: Felipe Gasper <felipe [...] felipegasper.com>
Date: Fri, 12 Sep 2014 20:45:02 +0200
CC: Father Chrysostomos via RT <perlbug-followup [...] perl.org>
Subject: Re: [perl #122753] Docs on destructors are inaccurate
Download (untitled) / with headers
text/plain 422b
On Fri, Sep 12, 2014 at 6:31 PM, Felipe Gasper <felipe@felipegasper.com> wrote:
Show quoted text
On 9/10/14 8:24 PM, James E Keenan via RT wrote:

Other porters:  Is the OP's assertion that these docs are out-of-date correct?

Felipe:  Would you be able to submit a patch pulled against blead?


I can submit, sure … do you mean in this RT, or via GitHub?

RT is our bugtracker, so please post them here.

Leon
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 524b
On Fri Sep 12 09:31:32 2014, felipe@felipegasper.com wrote: Show quoted text
> On 9/10/14 8:24 PM, James E Keenan via RT wrote:
> > > > Other porters: Is the OP's assertion that these docs are out-of-date > > correct? > > > > Felipe: Would you be able to submit a patch pulled against blead? > >
> > I can submit, sure … do you mean in this RT, or via GitHub? > > -F
RT. As an attachment either via the RT web site https://rt.perl.org or by attachment to response to perl5-porters mailing list. -- James E Keenan (jkeenan@cpan.org)
Subject: Re: [perl #122753] Docs on destructors are inaccurate
From: Felipe Gasper <felipe [...] felipegasper.com>
Date: Fri, 12 Sep 2014 17:58:55 -0500
To: perlbug-followup [...] perl.org
Download (untitled) / with headers
text/plain 666b
On 12 Sep 2014 5:54 PM, James E Keenan via RT wrote: Show quoted text
> On Fri Sep 12 09:31:32 2014, felipe@felipegasper.com wrote:
>> On 9/10/14 8:24 PM, James E Keenan via RT wrote:
>>> >>> Other porters: Is the OP's assertion that these docs are out-of-date >>> correct? >>> >>> Felipe: Would you be able to submit a patch pulled against blead? >>>
>> >> I can submit, sure … do you mean in this RT, or via GitHub? >> >> -F
> > RT. As an attachment either via the RT web site https://rt.perl.org or by attachment to response to perl5-porters mailing list. >
A post earlier indicated that this RT is a dupe. The referent RT seems to have been left in “limbo” … ? -F
From: Zefram <zefram [...] fysh.org>
Subject: Re: [perl #122753] Docs on destructors are inaccurate
To: perl5-porters [...] perl.org
Date: Wed, 13 Dec 2017 03:54:12 +0000
Fixed in commit addf67e13a08f45d3bb4c245c821b1ef2767c5a5. -zefram


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org