Skip Menu |

This queue is for tickets about the Exporter-NoWork CPAN distribution.

Report information
The Basics
Id: 33584
Status: resolved
Priority: 0/
Queue: Exporter-NoWork

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

Bug Information
Severity: Important
Broken in: 0.01
Fixed in: (no value)



In your import method, you have the following: while ($_ = shift) { Exporter::NoWork failed for me while I was using Moose and somewhere in the internals, when trying to subclass something, $_ gets aliased to a string constant, causing the 'Exporter::NoWork' import method to die with a 'Modification of a read-only value' error. The fix is simple: while ( local $_ = shift ) { Because $_ has not been localized, if it already has a value and it's aliased to a constant, then it's 'read only' and the assignment fails. The following snippet shows how this can work: sub foo { while ($_ = @_) {} } foreach ('bar') { foo($_) } Cheers, Ovid
Thank you for the report. 0.02 just uploaded to CPAN should fix the problem. Ben