Local:: namespace is not ignored
Closed this issue · 7 comments
First off, hi @andk! :)
I mangled a release yesterday and was surprised at what I saw.
https://metacpan.org/release/OALDERS/App-perlimports-0.000001
I have a dir called test-data/lib/Local
, which I hadn't added to no_index
. I had assumed that Local::
would be an ignored namespace. I'm not sure if this is by convention or if it's actually enforced. So, I was surprised to see the Local::
modules in my release because:
- I thought
Local::
would be ignored - My namespace for this new release is not under
Local::
, so I figured the PAUSE indexer would have just ignored it anyway.
I checked 02packages
and I do see my Local::
modules listed there as well as modules from other authors which have the same prefix.
I've fixed the subsequent release on my end and I can schedule the Local::
modules to be removed from the index, but wondered if I should hold off on that until someone has a look at this ticket?
PAUSE does not have any restriction on the namespace of secondary modules in the dist, FWIW. Only that there must be one matching the dist name.
As far as I know Local::
is just a convention.
There was a recent blog post promoting the use of Local:: to avoid namespacing conflicts: https://phoenixtrap.com/2021/04/13/avoid-cpan-conflicts-in-your-personal-perl-modules
We have the following Local:: modules in the index already:
Local::Abstract,AHERNIT,f
Local::After,OALDERS,f
Local::CustomImport,OALDERS,f
Local::DBD::ADO::DSN,SGOELDNER,f
Local::DBRecord,REID,f
Local::DiskWatcher,DMALONE,f
Local::I18N::ru,RENEEB,f
Local::Info,DMALONE,f
Local::MifTree,RST,f
Local::MooseTypeLibrary,OALDERS,f
Local::MountWatcher,DMALONE,f
Local::MrGamoo::MySelf,SOLVE,f
Local::MrMagoo::FileList,SOLVE,f
Local::MrMagoo::ReadInput,SOLVE,f
Local::MulticastServer,DMALONE,f
Local::MyOwnMoo,OALDERS,f
Local::MyOwnMoose,OALDERS,f
Local::Null::Logger,BDFOY,f
Local::Over,AHERNIT,f
Local::Payload,REID,f
Local::Plugin1,AHERNIT,f
Local::Plugin2,AHERNIT,f
Local::RequireExporter,OALDERS,f
Local::STDOUT,OALDERS,f
Local::Seamstress::Base,ACCARDO,f
Local::Seamstress::Base,TBONE,c
Local::SymbolInExport,OALDERS,f
Local::Target,AHERNIT,f
Local::UnixSocketClient,DMALONE,f
Local::UnixSocketServer,DMALONE,f
Local::UnixSocketServer::Session,DMALONE,f
Local::UsesMoo,OALDERS,f
Local::UsesMoose,OALDERS,f
Local::UsesMyOwnMoo,OALDERS,f
Local::UsesMyOwnMoose,OALDERS,f
Local::UsesTypesStandard,OALDERS,f
Local::UsesUsesImportInto,OALDERS,f
Local::ViaExporter,OALDERS,f
Local::ViaSubExporter,OALDERS,f
Local::Yenta::MySelf,SOLVE,f
There was a recent blog post promoting the use of Local:: to avoid namespacing conflicts: phoenixtrap.com/2021/04/13/avoid-cpan-conflicts-in-your-personal-perl-modules
That article quotes this page: https://pause.perl.org/pause/query?ACTION=pause_namingmodules#Local
So, I'm still a bit confused here. The statement above does not seem to reflect the reality of what happened with my upload.
The quoted statement just lays out a convention your code may use (and CPAN modules should respect) - PAUSE does not have any specific functionality related to that namespace.
Upon looking at it again, it's less misleading, but I still think
This allows you to be confident that the name you choose under Local isn't going to conflict with anything from the outside world.
is not as helpful as it could be. If there's nothing to stop anyone from using that namespace, I can't be truly confident about not finding a conflict. In practice, it's likely a non-issue, though.
There are, at least, no distributions named Local-*, indicating that all currently-indexed modules are just "helpers". If there is nothing on cpan that has declared an explicit prereq on something in the Local:: namespace, I'd be in favour of
- removing all Local::* modules from the 02packages and 06perms indexes, and
- altering PAUSE so that such modules never get indexed again.
I'd put this on the agenda to discuss at PTS if we were having one. :/
From PTS 2023, PAUSE will continue to index Local::*. Uploading Local might be a weird thing to do, but we don't think it should be prevented.