Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 93666
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: ZDM [...] cpan.org
Cc:
AdminCc:

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



Subject: Moose::Exporter unimport to level not supported
Is it possible to make unimport method, generated by Moose::Exporter, support _get_caller options, as well as in import method, so i could write: Moose->unimport( { into_level => 1 } );
Subject: Re: [rt.cpan.org #93666] Moose::Exporter unimport to level not supported
Date: Sat, 8 Mar 2014 21:36:15 -0800
To: Dmytro Zagashev via RT <bug-Moose [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Sat, Mar 08, 2014 at 11:56:47PM -0500, Dmytro Zagashev via RT wrote: Show quoted text
> Is it possible to make unimport method, generated by Moose::Exporter, support _get_caller options, as well as in import method, so i could write: > > Moose->unimport( { into_level => 1 } );
Perhaps. It would need to be implemented in Sub::Exporter first, as that's what Moose::Exporter uses to work its magic.
Subject: Re: [rt.cpan.org #93666] Moose::Exporter unimport to level not supported
Date: Sun, 09 Mar 2014 08:33:17 +0200
To: bug-Moose [...] rt.cpan.org
From: "dzagashev [...] gmail.com" <dzagashev [...] gmail.com>
I think, we need just replace: my $caller = scalar caller(); with: my $caller = _get_caller(@_); in Moose::Exporter::_make_unimport_sub On 09.03.2014 7:36, Karen Etheridge via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=93666 > > > On Sat, Mar 08, 2014 at 11:56:47PM -0500, Dmytro Zagashev via RT wrote:
>> Is it possible to make unimport method, generated by Moose::Exporter, support _get_caller options, as well as in import method, so i could write: >> >> Moose->unimport( { into_level => 1 } );
> Perhaps. It would need to be implemented in Sub::Exporter first, as that's > what Moose::Exporter uses to work its magic. > >
Subject: Re: [rt.cpan.org #93666] Moose::Exporter unimport to level not supported
Date: Sun, 09 Mar 2014 08:43:16 +0200
To: bug-Moose [...] rt.cpan.org
From: "dzagashev [...] gmail.com" <dzagashev [...] gmail.com>
I tested and this works On 09.03.2014 8:33, dzagashev@gmail.com via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=93666 > > > I think, we need just replace: > > my $caller = scalar caller(); > > with: > > my $caller = _get_caller(@_); > > in Moose::Exporter::_make_unimport_sub > > On 09.03.2014 7:36, Karen Etheridge via RT wrote:
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=93666 > >> >> On Sat, Mar 08, 2014 at 11:56:47PM -0500, Dmytro Zagashev via RT wrote:
>>> Is it possible to make unimport method, generated by Moose::Exporter, support _get_caller options, as well as in import method, so i could write: >>> >>> Moose->unimport( { into_level => 1 } );
>> Perhaps. It would need to be implemented in Sub::Exporter first, as that's >> what Moose::Exporter uses to work its magic. >> >>
>
RT-Send-CC: dzagashev [...] gmail.com
On 2016-09-11 12:31:50, DROLSKY wrote: Show quoted text
This PR has been merged and will be in 2.1806. thanks!