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

Merged
merged 1 commit into from Jul 3, 2012

Conversation

Projects
None yet
3 participants
Contributor

schwern commented Jun 18, 2012

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:

  • Update utf8::all to the latest to avoid inconsistencies between our
    hacks and theirs

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

Mostly fix the fight between the open pragma and autodie.
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:

* Update utf8::all to the latest to avoid inconsistencies between our
  hacks and theirs

@ghost ghost assigned schwern Jun 18, 2012

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

Contributor

schwern commented Jun 19, 2012

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 added a commit that referenced this pull request Jul 3, 2012

Merge pull request #223 from schwern/utf8_vs_autodie
Mostly fix the fight between the open pragma and autodie.

@exodist exodist merged commit 8912fc6 into master Jul 3, 2012

Contributor

exodist commented Jul 3, 2012

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.

Contributor

schwern commented Jul 3, 2012

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

schwern added a commit that referenced this pull request Jul 7, 2012

Revert "Merge pull request #223 from schwern/utf8_vs_autodie"
This reverts commit 8912fc6, reversing
changes made to 829827e.

The fix is fine, but autodie fixed the problem and this would get in the way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment