Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Lower case username as PAUSEID has casing problems #28

Closed
schwern opened this Issue Nov 7, 2012 · 4 comments

Comments

Projects
None yet
2 participants
Collaborator

schwern commented Nov 7, 2012

If I don't have a ~/.pause file it will use my username, "schwern" and store the tarball in schwern/Foo-1.23.tgz. But it will index it as S/SC/SCHWERN/Foo-1.23.tgz. CPAN clients will then ask for S/SC/SCHWERN/Foo-1.23.tgz but that will not exist on a case sensitive filesystem.

Pinto should either upcase the PAUSEID consistently or don't change the case at all.

PS I was using a file URL to access Pinto.

Owner

thaljef commented Nov 7, 2012

On Nov 7, 2012, at 11:09 AM, Michael G. Schwern wrote:

Pinto should either upcase the PAUSEID consistently or don't change the case at all.

Agreed. Pinto should not change the case of any author id. That should be easy to fix. The PAUSE convention of up-casing is unfortunate.

Stratopan preserves the original case, but does case-insensitive lookups. I've implemented this by storing an additional user_canonical field that has the lower case version. We can certainly do the same for the author_id in Pinto. The tricky part will be handling authors who are both local and PAUSE authors. So if your .pause file says "schwern" you probably meant "SCHWERN".

Off the top of my head, we could solve this by having a separate config file for pinto. So if you have a .pause, use the up-cased value from there. If not, fall back to the .pinto config file with exact case. Otherwise fall back to the user name with exact case.

BTW, it's great to have you looking at this stuff. I feel like I've been dancing by myself for a long time.

-Jeff

Collaborator

schwern commented Nov 7, 2012

On 2012.11.7 2:57 PM, Jeffrey Ryan Thalhammer wrote:

Off the top of my head, we could solve this by having a separate config file
for pinto. So if you have a .pause, use the up-cased value from there. If not,
fall back to the .pinto config file with exact case. Otherwise fall back to
the user name with exact case.

Yes, I'd upcase a username from .pause because it was probably a mistake. And
yes, I'd leave whatever is in the .pinto config alone.

But I'd be inclined to also upcase an author ID derived from the username just
to match the PAUSE convention. While normally I'd say to do as little
modification of the data as possible, SHOUTINGNAME is so ingrained into CPAN
that it would be surprising to see otherwise.

BTW, it's great to have you looking at this stuff. I feel like I've been
dancing by myself for a long time.

BRACE FOR BUG REPORTS!

Owner

thaljef commented Nov 7, 2012

On Nov 7, 2012, at 12:43 PM, Michael G. Schwern wrote:

Yes, I'd upcase a username from .pause because it was probably a mistake. And
yes, I'd leave whatever is in the .pinto config alone.

Ok, that's what we'll do then.

But I'd be inclined to also upcase an author ID derived from the username just
to match the PAUSE convention. While normally I'd say to do as little
modification of the data as possible, SHOUTINGNAME is so ingrained into CPAN
that it would be surprising to see otherwise.

Ehh, I'm not so sure. I'll think about it.

BRACE FOR BUG REPORTS!

Bring it on!

Owner

thaljef commented Nov 8, 2012

I just shipped Pinto-0.062, which always forces the author ID to UPPERCASE in the index and the filesystem. Internally, it still stores the author ID with the original case, so it can be displayed that way if you want.

@thaljef thaljef closed this Nov 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment