-
Notifications
You must be signed in to change notification settings - Fork 62
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
Clean up modules' exporting/importing symbols #534
Merged
Merged
Conversation
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
* lib/Locale/Po4a/Common.pm: Remove the "textdomain" subroutine from export-list in Common module. The every callers use the fully qualified subroutine name. * scripts/msgsearch: Use fully qualified method name "textdomain" in the msgsearch script.
* lib/Locale/Po4a/Common.pm: Explicitly export the Common module's wrap_msg subroutine. @EXPORT_OK is preferred way of exporting to @export. * lib/Locale/Po4a/Chooser.pm, lib/Locale/Po4a/TransTractor.pm, lib/Locale/Po4a/Wml.pm, msguntypot, po4a, po4a-gettextize, po4a-normalize, po4a-translate, po4a-updatepo: Explicitly import the Common module's wrap_msg subroutine.
* lib/Locale/Po4a/Common.pm: Explicitly export the Common module's "wrap_mod" subroutine. @EXPORT_OK is the preferred way to export. * lib/Locale/Po4a/AsciiDoc.pm, lib/Locale/Po4a/Chooser.pm, lib/Locale/Po4a/InProgress/Debconf.pm, lib/Locale/Po4a/Man.pm, lib/Locale/Po4a/Org.pm, lib/Locale/Po4a/Pod.pm, lib/Locale/Po4a/RubyDoc.pm, lib/Locale/Po4a/Sgml.pm, lib/Locale/Po4a/TeX.pm, lib/Locale/Po4a/Text.pm, lib/Locale/Po4a/TransTractor.pm, lib/Locale/Po4a/Xhtml.pm, lib/Locale/Po4a/Xml.pm, lib/Locale/Po4a/Yaml.pm, po4a-gettextize: Explicitly import the Common module's "wrap_mod" subroutine.
* lib/Locale/Po4a/Common.pm: Explicitly export the Common's "wrap_ref_mod" subroutine. @EXPORT_OK is the preferred way of exporting to @export. * lib/Locale/Po4a/InProgress/NewsDebian.pm, lib/Locale/Po4a/KernelHelp.pm, lib/Locale/Po4a/Man.pm, lib/Locale/Po4a/Sgml.pm, lib/Locale/Po4a/TeX.pm, lib/Locale/Po4a/Xml.pm, po4a: Explicitly import the Common's "wrap_ref_mod" subroutine.
* lib/Locale/Po4a/Common.pm: Explicitly export the Common's "gettext" subroutine. The @EXPORT_OK is the preferred way of exporting to @export. * lib/Locale/Po4a/Chooser.pm, lib/Locale/Po4a/KernelHelp.pm, lib/Locale/Po4a/TransTractor.pm, lib/Locale/Po4a/Wml.pm, msguntypot, po4a, po4a-gettextize, po4a-normalize, po4a-translate, po4a-updatepo, scripts/msgsearch: Explicitly import the Common's "gettext" subroutine.
* lib/Locale/Po4a/Common.pm: Explicitly export the Common's "dgettext" subroutine. The @EXPORT_OK is the preferred way to export. * lib/Locale/Po4a/AsciiDoc.pm, lib/Locale/Po4a/InProgress/Debconf.pm, lib/Locale/Po4a/InProgress/NewsDebian.pm, lib/Locale/Po4a/Man.pm, lib/Locale/Po4a/Org.pm, lib/Locale/Po4a/Pod.pm, lib/Locale/Po4a/RubyDoc.pm, lib/Locale/Po4a/Sgml.pm, lib/Locale/Po4a/TeX.pm, lib/Locale/Po4a/Text.pm, lib/Locale/Po4a/TransTractor.pm, lib/Locale/Po4a/Xhtml.pm, lib/Locale/Po4a/Xml.pm, lib/Locale/Po4a/Yaml.pm, po4a, po4a-gettextize, po4a-normalize: Explicitly import the Common's "dgettext" subroutine.
* lib/Locale/Po4a/Po.pm: Do not export the %debug variable by default from the Po module. The variable is not used anywhere unconditionally.
* lib/Locale/Po4a/Po.pm: Removed the TransTractor module from the Po module. Po and TransTractor used to "use" each others.
* lib/Locale/Po4a/TransTractor.pm: There were TransTractor's export list, but they were not used anywhere.
* lib/Locale/Po4a/AsciiDoc.pm: Removed the empty export-list from the AsciiDoc module. The @export variable was empty.
* lib/Locale/Po4a/InProgress/Debconf.pm: Removed the empty export-list from the Debconf module. The @export list was empty.
* lib/Locale/Po4a/KernelHelp.pm: Removed the Exporter module and the @export variable from the KernelHelp module. The list was empty.
* lib/Locale/Po4a/Man.pm: Removed the empty export-list from the Man module. The @export list was empty.
* lib/Locale/Po4a/InProgress/NewsDebian.pm: Removed the empty export-list from the NewsDebian module. The @export list was empty.
* lib/Locale/Po4a/Pod.pm: Removed the Exporter module from the Pod module. There is nothing to export.
* lib/Locale/Po4a/RubyDoc.pm: Removed the Exporter module from the RubyDoc module. There was no export-list.
* lib/Locale/Po4a/BibTeX.pm: Removed the empty export-list from the BibTeX module. The @export list was empty.
* lib/Locale/Po4a/TeX.pm: Removed the Exporter module from the TeX module. The exported symbols were not used implicitly by its child modules.
* lib/Locale/Po4a/Halibut.pm: Removed the empty export-list from the Halibut module. The @export list was empty.
* lib/Locale/Po4a/LaTeX.pm: Removed the empty export-list from the LaTeX module. The @export list was empty.
* lib/Locale/Po4a/Texinfo.pm: Removed the empty export-list from the Texinfo module. The @export list was empty.
* lib/Locale/Po4a/Yaml.pm: Removed the Exporter module and the @export variable from the Yaml module. The list was empty.
* lib/Locale/Po4a/Text.pm: Removed the empty export-list from the Text module. The @export list was empty.
* lib/Locale/Po4a/Sgml.pm: Removed the empty export-list from the Sgml module. The @export list was empty.
* lib/Locale/Po4a/Xml.pm: Removed the Xml module's "new" subroutine symbol from its export list. The Xml module inherits from the TransTractor module and uses the TransTractor's "new" subroutine.
* lib/Locale/Po4a/Wml.pm: Removed the empty export-list from the Wml module. The @export list was empty.
Thank you very much for this change @gemmaro. I reviewed it, and it sounds good. I'm so happy that you help me preventing this code from rotting. Please do not hesitate to do the cleanups that were not target of this PR if you feel so :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a continuation from #533.
According to the Exporter's perldoc, this change follows the rationales:
@EXPORT_OK
.Commits are grouped as follows.
Followings are not the targets of this pull request:
@AUTOLOAD
variable declarationsmakespace
subroutine declarationsour
for the version variableThank you,
TODO list:
@EXPORT_OK
instead of@EXPORT
in the Xml module, or remove it and use explicit calling