develooper Front page | perl.perl5.porters | Postings from September 2014

Re: [perl #122753] perlbug AutoReply: Docs on destructors are inaccurate

From:
Felipe Gasper
Date:
September 10, 2014 19:24
Subject:
Re: [perl #122753] perlbug AutoReply: Docs on destructors are inaccurate
Message ID:
5410A546.5040008@felipegasper.com
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:
> 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
>



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