Skip Menu |

This queue is for tickets about the Safe CPAN distribution.

Report information
The Basics
Id: 99563
Status: open
Priority: 0/
Queue: Safe

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

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



Subject: Safe->new pollutes main namespace with "main::" blank vars
Minimized test case: use Test::Routine::Util; use Test::Routine; use Safe; Safe->new; run_me; The problem is that $default_share has some faulty logic with its version checks. If the version check fails, the false value still counts as "", not (). So, you end up with "" values in the array. When $obj->share_from gets that list, it gets a blank variable and inserts that into main as "main::". Package::Stash and Class::MOP hate this and croaks.
The patch is fairly straightforward: - ($] < 5.010 && qw[ &utf8::SWASHGET ]), + ($] < 5.010 ? qw[ &utf8::SWASHGET ] : () ), ...as discussed on the p5p list.