Skip Menu |
 

This queue is for tickets about the Mail-SPF CPAN distribution.

Report information
The Basics
Id: 86185
Status: open
Priority: 0/
Queue: Mail-SPF

People
Owner: Nobody in particular
Requestors: peter.baranyi [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



From peter.baranyi [...] gmail.com Sun Jun 16 13: 01:15 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.22 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
X-Spam-Flag: NO
Content-Type: multipart/mixed; boundary="047d7b10d03df97e7704df486c4a"
Message-ID: <CAFALDwFFyAEZQ1j0HZ9m8E4MC4F=jdGs=uHw5toL+WJjiu0y6g [...] mail.gmail.com>
X-Received: by 10.50.92.69 with SMTP id ck5mr3001858igb.107.1371402065770; Sun, 16 Jun 2013 10:01:05 -0700 (PDT)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -6.22
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id D276D240ADE for <cpan-bug+Mail-SPF [...] hipster.bestpractical.com>; Sun, 16 Jun 2013 13:01:15 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SRwa2mqB8RC2 for <cpan-bug+Mail-SPF [...] hipster.bestpractical.com>; Sun, 16 Jun 2013 13:01:14 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id C361A2403AC for <bug-Mail-SPF [...] rt.cpan.org>; Sun, 16 Jun 2013 13:01:13 -0400 (EDT)
Received: (qmail 24603 invoked by alias); 16 Jun 2013 17:01:13 -0000
Received: from mail-ie0-f180.google.com (HELO mail-ie0-f180.google.com) (209.85.223.180) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sun, 16 Jun 2013 10:01:09 -0700
Received: by mail-ie0-f180.google.com with SMTP id f4so5044199iea.39 for <bug-Mail-SPF [...] rt.cpan.org>; Sun, 16 Jun 2013 10:01:05 -0700 (PDT)
Received: by 10.42.209.72 with HTTP; Sun, 16 Jun 2013 10:00:45 -0700 (PDT)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Delivered-To: cpan-bug+Mail-SPF [...] hipster.bestpractical.com
Subject: Using the "Error" module is no longer recommended
Return-Path: <peter.baranyi [...] gmail.com>
X-RT-Mail-Extension: mail-spf
X-Original-To: cpan-bug+Mail-SPF [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=SUMvvIpJ8xWuMJYl1MuK1JKzvBDCC3NRTs3F/k24UxA=; b=q/kx/hVGDGzg0ebhv+XCPb2VH0pmQIN+8pLFENNPWCP/qeW5QBsmlw6bp3vfIBFDPj Gshd6UdrBOX9+yQV3FbbvTcUBuRrGBdwY5VpkHNVecCaYmwLmchnRzF8aoyc/MY/sUGg 5qN9H6sE7AzgxEGn7Zc+en//5oaneJqxsTWqZldhLGfW1SfnW3tA89TF7721OZG/fRBr U1SasIf7HenqiE0Pi82pT/XkUUSWdCytvir9kFfAJsvodrDdC4/vSaO8G9qNbLtR4Wlx V4LbawCftnQc0648pJpAXXdCpYvLipV41XxyMUCPdns2mCGCALTzvxuUBR3i04Iz7lk1 i4og==
Date: Sun, 16 Jun 2013 13:00:45 -0400
X-Spam-Level:
To: bug-Mail-SPF [...] rt.cpan.org
From: Peter Baranyi <peter.baranyi [...] gmail.com>
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: iso-8859-1
Content-Length: 900
Download (untitled) / with headers
text/plain 900b
Hi, if you check the Error module, it states at the beginning that Using the "Error" module is no longer recommended due to the black-magical nature of its syntactic sugar, which often tends to break. Its maintainers have stopped actively writing code that uses it, and discourage people from doing so. Please consider using something else. When I use Mail::SPF, I get multiple exceptions although everything is working fine. If I enable a simple die signal checking, $SIG{__DIE__} = sub { warn "Fatal exception\n"; }; I see the message printed 6 times! Unfortunately for me I am using the Carp module with cluck, and each time I would get like 20 pages of tracebacks for each exception! How can I avoid this, without disabling the die catch? I tried putting no Carp; where Mail::SPF is used but it helped only the first time and I get the same traceback for consecutive calls. regards, Peter
X-Attachment-ID: f_hi0hb5ja0
Content-Type: application/octet-stream; name="spf.pl"
Content-Disposition: attachment; filename="spf.pl"
Content-Transfer-Encoding: base64
Content-Length: 963
Download spf.pl
text/x-perl 963b

Message body is not shown because sender requested not to inline it.

MIME-Version: 1.0
In-Reply-To: <CAFALDwFFyAEZQ1j0HZ9m8E4MC4F=jdGs=uHw5toL+WJjiu0y6g [...] mail.gmail.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <CAFALDwFFyAEZQ1j0HZ9m8E4MC4F=jdGs=uHw5toL+WJjiu0y6g [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-12015-1381467659-1542.86185-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 530
Download (untitled) / with headers
text/plain 530b
Perl's exception handling fundamentally relies on die'ing inside eval blocks. Any __DIE__ handlers will *always* be called for any exception raised, with or without use of the Error module, and even when the Perl process itself doesn't die: $ perl -e '$SIG{__DIE__} = sub { print("died.\n") }; die("FOO")' died. FOO at -e line 1. $ echo $? 255 $ perl -e '$SIG{__DIE__} = sub { print("died.\n") }; eval { die("FOO") }' died. $ echo $? 0 How this interferes with the use of the Carp module isn't clear to me. Can you clarify?
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-12015-1381467659-1542.86185-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <CAFALDwFFyAEZQ1j0HZ9m8E4MC4F=jdGs=uHw5toL+WJjiu0y6g [...] mail.gmail.com> <rt-4.0.16-12015-1381467659-1542.86185-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-12120-1381468547-1565.86185-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 179
Download (untitled) / with headers
text/plain 179b
http://stackoverflow.com/a/2168408/454126 points out that you can use $^S inside your __DIE__ handler to distinguish between an exception and a real "interpreter dying" situation.
From peter.baranyi [...] gmail.com Wed Oct 16 20: 59:10 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.277 tagged_above=-99.9 required=10 tests=[AWL=0.057, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_SOFTFAIL=0.665] autolearn=ham
In-Reply-To: <rt-4.0.16-12120-1381468547-866.86185-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-86185 [...] rt.cpan.org> <CAFALDwFFyAEZQ1j0HZ9m8E4MC4F=jdGs=uHw5toL+WJjiu0y6g [...] mail.gmail.com> <rt-4.0.16-12015-1381467659-1542.86185-6-0 [...] rt.cpan.org> <rt-4.0.16-12120-1381468547-866.86185-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Received: by 10.50.128.137 with SMTP id no9mr4476236igb.36.1381971531338; Wed, 16 Oct 2013 17:58:51 -0700 (PDT)
Message-ID: <CAFALDwGJmz5GnpfAZ0446X-OKzCoZPZdAbKTVGyikpqS_2S2Jw [...] mail.gmail.com>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.277
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id B3156240C47 for <cpan-bug+Mail-SPF [...] hipster.bestpractical.com>; Wed, 16 Oct 2013 20:59:10 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OjxgXaavtoxi for <cpan-bug+Mail-SPF [...] hipster.bestpractical.com>; Wed, 16 Oct 2013 20:59:05 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 5C23D240C3A for <bug-Mail-SPF [...] rt.cpan.org>; Wed, 16 Oct 2013 20:59:05 -0400 (EDT)
Received: (qmail 8585 invoked by alias); 17 Oct 2013 00:59:04 -0000
Received: from mail-ie0-f176.google.com (HELO mail-ie0-f176.google.com) (209.85.223.176) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 16 Oct 2013 17:58:57 -0700
Received: by mail-ie0-f176.google.com with SMTP id u16so2816974iet.35 for <bug-Mail-SPF [...] rt.cpan.org>; Wed, 16 Oct 2013 17:58:51 -0700 (PDT)
Received: by 10.43.100.135 with HTTP; Wed, 16 Oct 2013 17:58:31 -0700 (PDT)
Delivered-To: cpan-bug+Mail-SPF [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #86185] Using the "Error" module is no longer recommended
Return-Path: <peter.baranyi [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=+fxJY2ST8ESxlQCrHaYcVpzeCCun77DuwGqHBiNoSnQ=; b=giLI6Vs1jvGVMkVMhwditBqt+MnENQU13lZ0g1sq7lJ9HrRhEobSmQBPrwxb5gW1P7 6EIv1HhKQtTN+wwMZokhzXBIYny3H/DwHMzr9eqkz5L43TVweUd0y1Mknw6LWDq65Q0p SVacoqr8eUe6PmQeh0bE5qCjqYKHNBAMSO37OCwVK0i6zTdnOAzd6UksEeiD/6xxXztQ /zZUFY20jL9I8zc92ql0DJu/fqmrPKlg9pjRCs2h0S/ZeVUbitVn1SkvKWiL69ATET1P nSfMc8RvY/HZMMOv9w5iyl73CNMXFCQoNKYhS6UrhkX0ICk/UsrTbiZOhSbhIf8gyyAb 2aww==
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Mail-SPF [...] hipster.bestpractical.com
X-RT-Mail-Extension: mail-spf
Date: Wed, 16 Oct 2013 20:58:31 -0400
X-Spam-Level:
To: bug-Mail-SPF [...] rt.cpan.org
From: Peter Baranyi <peter.baranyi [...] gmail.com>
RT-Message-ID: <rt-4.0.16-25868-1381971551-1693.86185-0-0 [...] rt.cpan.org>
Content-Length: 598
Download (untitled) / with headers
text/plain 598b
The I mentioned the carp module because I get a huge trace for each exception which I don't want since as you point out, exceptions are normal. Thanks for the stackoverflow link, I'll try that. But forget about this, I wrote because the Error module is deprecated. On Fri, Oct 11, 2013 at 1:15 AM, Julian Mehnle via RT <bug-Mail-SPF@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=86185 > > > http://stackoverflow.com/a/2168408/454126 points out that you can use $^S inside your __DIE__ handler to distinguish between an exception and a real "interpreter dying" situation.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-25868-1381971551-1693.86185-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-86185 [...] rt.cpan.org> <CAFALDwFFyAEZQ1j0HZ9m8E4MC4F=jdGs=uHw5toL+WJjiu0y6g [...] mail.gmail.com> <rt-4.0.16-12015-1381467659-1542.86185-6-0 [...] rt.cpan.org> <rt-4.0.16-12120-1381468547-866.86185-6-0 [...] rt.cpan.org> <CAFALDwGJmz5GnpfAZ0446X-OKzCoZPZdAbKTVGyikpqS_2S2Jw [...] mail.gmail.com> <rt-4.0.16-25868-1381971551-1693.86185-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-4662-1381973049-561.86185-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 413
Download (untitled) / with headers
text/plain 413b
On 2013-10-16 20:59:11, peter.baranyi@gmail.com wrote: Show quoted text
> But forget about this, I wrote because the Error module is deprecated.
Understood. However, Mail::SPF is existing code, and removing the use of Error.pm just because of its deprecation is likely not going to happen. I read about the issues of Error.pm, but Mail::SPF is not affected by any of them, so there is no pressing need for change. Wishlisting.
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-4662-1381973049-561.86185-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-86185 [...] rt.cpan.org> <CAFALDwFFyAEZQ1j0HZ9m8E4MC4F=jdGs=uHw5toL+WJjiu0y6g [...] mail.gmail.com> <rt-4.0.16-12015-1381467659-1542.86185-6-0 [...] rt.cpan.org> <rt-4.0.16-12120-1381468547-866.86185-6-0 [...] rt.cpan.org> <CAFALDwGJmz5GnpfAZ0446X-OKzCoZPZdAbKTVGyikpqS_2S2Jw [...] mail.gmail.com> <rt-4.0.16-25868-1381971551-1693.86185-0-0 [...] rt.cpan.org> <rt-4.0.16-4662-1381973049-561.86185-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-21550-1423763624-42.86185-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 893
Download (untitled) / with headers
text/plain 893b
On Wed Oct 16 21:24:09 2013, JMEHNLE wrote: Show quoted text
> Understood. However, Mail::SPF is existing code, and removing the use > of Error.pm just because of its deprecation is likely not going to > happen. I read about the issues of Error.pm, but Mail::SPF is not > affected by any of them, so there is no pressing need for change.
Relying on Error now causes other issues, because the author (maybe reasonably) does not want to address the various issues it has with building (such as relying on absurdly high versions of Module::Build, which pulls in a ton of dependencies when building on older Perl releases). For those of us doing builds of Mail::SPF for utilities such as SpamAssassin, and keeping our modules separate from system perl, being able to build Mail::SPF without having to rely on Error is extremely important. See https://rt.cpan.org/Ticket/Display.html?id=102062 for reference.


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.