Question

I've got a Perl module that is prefixed with a company name, "Foobar::Thing", but was mistakenly created and uploaded to CPAN with the incorrect casing. I'd like to rename the module to use the proper casing, e.g "FooBar::Thing". There aren't too many users of this module yet, so I'm OK with fixing up usages of the module. Is renaming the CPAN module possible? Will it cause conflicts?

Was it helpful?

Solution

Since Perl module names are case-sensitive, CPAN should, in theory, be able to handle both FooBar::Thing and Foobar::Thing. Users may be confused, but CPAN should not be. However, you know what they say about 'theory' and 'practice', don't you? It would be good if you are able to provide an update to Foobar::Thing such that it (a) gives a deprecated warning when it is used, and (b) routes all calls to FooBar::Thing. You could also list FooBar::Thing as a pre-requisite for the updated Foobar::Thing. When you're confident everyone has upgraded, you can remove the debris from CPAN.

Note that case-insensitive file systema (such as NTFS on Windows or HFS on Mac OS X) may cause some issues — and CPAN may therefore head them off by disallowing modules that only differ by the upper-vs-lower case spelling of the module name. If so, you may have to use a suffix such as FooBar::Thing2 for version 2 of the module with the new capitalization. I'm not sure what the current rules for module registration are (telling you what was relevant 15+ years ago won't help much — even if I could remember), so I could be completely off target here.

You should look at what the Perl Author's Upload SErver (PAUSE) has to say On the Naming of Modules. However, AFAICS, it says nothing about case-sensitivity (in the sense of avoiding collisions based on differences in capitalization).

You should also go through:

but again, I don't see anything about case-sensitive module names. (Yes, an upper limit of 11 characters on components of a name, but ...)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top