Skip Menu |

This queue is for tickets about the Error CPAN distribution.

Report information
The Basics
Id: 46364
Status: resolved
Priority: 0/
Queue: Error

People
Owner: Nobody in particular
Requestors: maik.hentsche [...] amd.com
Cc:
AdminCc:

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



Subject: Name clashed with Error and Moose
Using Moose and Error together in one package returns a warning because both declare a function "with". The following example code: package Test; use warnings; use Moose; use Error qw(:try); returns: Prototype mismatch: sub Test::with: none vs (&;$) at - line 5 Since I doubt you want to change your API (and even more doubt the Moose guys want to change theirs) I assume at least a warning in the documentation would help. Versions: Moose: 0.78 Error: 0.17015 perl: 5.10 on Linux
On Tue May 26 07:03:22 2009, maik.hentsche@amd.com wrote: Show quoted text
> Using Moose and Error together in one package returns a warning because > both declare a function "with". > > The following example code: > > package Test; > > use warnings; > use Moose; > use Error qw(:try); > > returns: > Prototype mismatch: sub Test::with: none vs (&;$) at - line 5 > > Since I doubt you want to change your API (and even more doubt the > Moose guys want to change theirs) I assume at least a warning in the > documentation would help. >
Thanks for the report, and sorry it took me so long. It's now documented in Error-0.17016 (among other documentation changes). Find it at a CPAN mirror near you soon. Regards, -- Shlomi Fish
Resolving as fixed.
I would really like to use both Moose and Error modules together. Is there a workaround to make them work together? Thanks.
Subject: Re: [rt.cpan.org #46364] Name clashed with Error and Moose
Date: Fri, 5 Jan 2018 15:27:59 +0200
To: bug-Error [...] rt.cpan.org
From: Shlomi Fish <shlomif [...] shlomifish.org>
On Fri, 5 Jan 2018 05:08:32 -0500 " via RT" <bug-Error@rt.cpan.org> wrote: Show quoted text
> Queue: Error > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=46364 > > > I would really like to use both Moose and Error modules together. Is there a > workaround to make them work together? >
Please never use Error.pm as it is horrible and deprecated. See https://metacpan.org/pod/Error . Show quoted text
> Thanks.
-- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ http://www.shlomifish.org/lecture/C-and-CPP/bad-elements/ If you have the same ideas as everybody else, but have them one week earlier than everyone else — then you will be hailed as a visionary. But if you have them five years earlier, you will be named a lunatic. ( Barry Jones ) Please reply to list if it's a mailing list post - http://shlom.in/reply .