New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"define_alias" no longer works with just "use Encode::Alias" #116
Comments
It is not simple... because functions from Encode.pm calls functions from Encode/Alias.pm and also functions from Encode/Alias.pm calls functions from Encode.pm... Looks like those functions from Enocde.pm and Encode/Alias.pm needs to be moved into one module... I'm thinking about merging Encode/Alias.pm into Encode.pm. But because Encode/Alias.pm has global variables there can be other problems. @arc what do you think? |
@arc Here is less invasive patch which could to work. Can you test if it works for you too?
|
Yes, importing Encode 2.91 into blead and then applying that patch makes blead's tests pass. Thanks! I'll hold off on actually importing a newer Encode until there's a release including this change. |
Calling use Encode::Alias; cased error: Undefined subroutine &Encode::define_alias called at lib/Encode.pm line 102. Compilation failed in require at lib/Encode/Alias.pm line 7. BEGIN failed--compilation aborted at lib/Encode/Alias.pm line 7. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1. Fixes dankogai#116
Thanks for testing, I created pull request: #119 |
@arc New version with this fix was released. |
Calling use Encode::Alias; cased error: Undefined subroutine &Encode::define_alias called at lib/Encode.pm line 102. Compilation failed in require at lib/Encode/Alias.pm line 7. BEGIN failed--compilation aborted at lib/Encode/Alias.pm line 7. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1. Fixes dankogai#116
Calling use Encode::Alias; cased error: Undefined subroutine &Encode::define_alias called at lib/Encode.pm line 102. Compilation failed in require at lib/Encode/Alias.pm line 7. BEGIN failed--compilation aborted at lib/Encode/Alias.pm line 7. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1. Fixes dankogai#116
In Encode 2.91, this code
yields this error:
This was discovered when trying to import 2.91 into blead, because the Perl test suite does precisely that.
Reverting the change that 55364c9 made to lib/Encode/Alias.pm makes this problem go away. That may not be the ideal fix, though.
Since there's a circular dependency here — Encode.pm does
use Encode::Alias
, and Encode/Alias.pm doesuse Encode ()
perhaps it would be better to break the shared pieces out into a separate (internal) module that both Encode and Encode::Alias use?The text was updated successfully, but these errors were encountered: