Skip Menu |

This queue is for tickets about the File-Save-Home CPAN distribution.

Report information
The Basics
Id: 123377
Status: resolved
Priority: 0/
Queue: File-Save-Home

People
Owner: jkeenan [...] cpan.org
Requestors: dam [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: dam [...] cpan.org
Subject: [PATCH] Replace String::PerlIdentifier by String::Random
In Debian we are currently applying the following patch to File-Save-Home. We thought you might be interested in it too. Description: Replace String::PerlIdentifier by String::Random Use String::Random in tests instead of creating a whole new package (See #695559) Bug-Debian: https://bugs.debian.org/695559 Author: Xavier Guimard <x.guimard@free.fr> Reviewed-by: gregor herrmann <gregoa@debian.org> Reviewed-by: Damyan Ivanov <dmn@debian.org> Last-Update: 2017-10-25 The patch is tracked in our Git repository at https://anonscm.debian.org/cgit/pkg-perl/packages/libfile-save-home-perl.git/plain/debian/patches/replace-perlidentifier-by-string-random.patch Thanks for considering, Damyan Ivanov, Debian Perl Group
Here's the patch.

Message body is not shown because sender requested not to inline it.

On Wed Oct 25 06:20:28 2017, DAM wrote: Show quoted text
> Here's the patch.
While I am willing to accommodate your desire to reduce the packaging burden on Debian, I think your patch subtly changes the strings used in testing. The argument you are supplying for random_regex() restricts the identifiers to 10 lower-case letters. This is more restrictive than String::PerlIdentifier::make_varname(), which allows upper-case letters, underscores and (except in first position) numerals. Run the program attached. See this branch in github: https://github.com/jkeenan/file-save-home/tree/rt-123377-string-random Thank you very much. Jim Keenan
Subject: string-perlidentifier-vs-string-random.pl
# perl use strict; use warnings; use Data::Dump qw( dd ); use String::PerlIdentifier; use String::Random qw( random_regex ); my (@spi, @sr, @srimproved); for (1..200) { push @spi, make_varname(); } for (1..200) { push @sr, random_regex(q([a-z]{10})); } for (1..200) { push @srimproved, random_regex(q([_A-Za-z][_A-Za-z0-9]{9})); } dd( [ sort @spi ], [ sort @sr ], [ sort @srimproved ], );
На 26 окт. 2017, чт 05:50:05, JKEENAN написа: Show quoted text
> On Wed Oct 25 06:20:28 2017, DAM wrote:
> > Here's the patch.
> > The argument you are supplying for random_regex() > restricts the identifiers to 10 lower-case letters. This is more > restrictive than String::PerlIdentifier::make_varname(), which allows > upper-case letters, underscores and (except in first position) > numerals. Run the program attached. > > See this branch in github: > > https://github.com/jkeenan/file-save-home/tree/rt-123377-string-random
You are certainly right. I have updated the patch using the changes in commit b339966dc9f1da6a34a1664e47e7d83f98d7c47b. Thank you for your help, dam
I have merged the rt-123377-string-random branch into master and released v0.11 to CPAN. Marking ticket resolved. Thank you very much. Jim Keenan