libwww-perl / URI

The Perl URI module
https://metacpan.org/pod/URI
Other
57 stars 48 forks source link

URI::_punycode private functions underscored #47

Open genio opened 6 years ago

genio commented 6 years ago

Make all functions not documented actually private by following the _function_name convention.

While this won't change any behavior or fix any problems, it will follow convention a bit better and reduce some of the exceptions in dist.ini for POD checks.

karenetheridge commented 6 years ago

Before making this change, we should check with grep.cpan.me that no other distributions are relying on the existing names (and get those fixed first).

It might be a good idea at any rate to add sub aliases with the old names, and a deprecation warning, e.g.:

sub function_name
{
    warnings::warnif('deprecated', 'function_name is intended to be internal only and its use outside this module is not supported');
    goto &_function_name;
}
jjatria commented 5 years ago

As part of this month's (and last!) PRC, I started taking a look at this issue. I checked some of the easier methods, and added deprecation warnings to os_path, fix_path, nss, and nid. These are the ones I found no uses for, with the exception of nss, which is used by URI::db.

Not sure if this is worth a pull request, but it does look like a little progress, so I thought I'd point it out.