Great catch!
However, the separation isn't needed. As soon as I saw you put the EXPORT_OK into an anonymous array, changed from the taking of the reference as I had it, I realized that's all that was needed. So all now instead of being a reference to the array, it's a reference to a copy of it:
our %EXPORT_TAGS = (
all => [ @EXPORT_OK ],
private => _export_private(),
);
sub _export_private {
push @EXPORT_OK, @EXPORT_PRIVATE;
return \@EXPORT_OK;
}
Output:
$VAR1 = {
'private' => [
'add_bugtracker',
'add_repository',
'changes',
'changes_bump',
'changes_date',
'ci_badges',
'ci_github',
'git_ignore',
'init',
'make_test',
'manifest_skip',
'move_distribution_files',
'remove_unwanted_files',
'version_bump',
'version_info',
'_git_commit',
'_git_push',
'_validate_git'
],
'all' => [
'add_bugtracker',
'add_repository',
'changes',
'changes_bump',
'changes_date',
'ci_badges',
'ci_github',
'git_ignore',
'init',
'make_test',
'manifest_skip',
'move_distribution_files',
'remove_unwanted_files',
'version_bump'
'version_info',
]
};
|