evalEmpire / perl5i

A single module to fix as much of Perl 5 as possible in one go
http://search.cpan.org/perldoc?perl5i
Other
156 stars 42 forks source link

Mostly fix the fight between the open pragma and autodie. #223

Closed schwern closed 12 years ago

schwern commented 12 years ago

utf8::all switched from using a wrapper around open to using the open pragma. Unfortunately, autodie loses the open pragma. This fixes most of the problem. The only thing remaining is because autodie does not recognize our open() as CORE::open() it formats the error message a little differently. At this point I'd rather see the problem fixed inside autodie than hack the bug further here.

I'm not entirely sure why its kosher to have a function named open() that calls open() (which is autodie's open). It was necessary to name our function open() so that autodie produced a sensible error message.

In addition:

PS This will fix the current failing tests and get CPAN working again.

spacebat commented 12 years ago

Just tried this in perl 5.14.2 and it works, no test failures.

schwern commented 12 years ago

I just supplied a better fix to autodie. @pjf is excited, so hopefully we'll see an autodie release soon and I can junk this hack.

exodist commented 12 years ago

oops, I suspect I did something wrong. I saw a pull request, it said it could eb auto-merged.. I thought it was on my fork but it appears to be in the main perl5i... oops.

schwern commented 12 years ago

There's no need for my hack now that autodie is fixed. No worries, I'll revert it.