Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove no warnings 'redefine'; and correctly load dependences
Calling no warnings 'redefine'; just hide a read problem that one function is later redefined by another. Such thing should not happen, and if there is it should be fixed. The real problem is exporting all Encode functions into used modules, including functions encode() and decode(). Correct way is to export only those functions which are really needed by modules. Or to call Encode function with whole package name (e.g. Encode::find_encoding). Another problem is time when Encode module is loaded. By calling require it is done at runtime, after current file was already parsed. It is too late specially for prototyped functions and also constant. Calling use instead of require fixes this problem. After those fixes no warnings 'redefine'; can be removed and modules are warning-free.
- Loading branch information
Showing
4 changed files
with
8 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters