Skip Menu |

This queue is for tickets about the Module-Rename CPAN distribution.

Report information
The Basics
Id: 88015
Status: new
Priority: 0/
Queue: Module-Rename

People
Owner: Nobody in particular
Requestors: jim.cochrane [...] gmail.com
Cc:
AdminCc:

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



Subject: New bugs: Problems with 1- or 2-letter module names
Date: Wed, 21 Aug 2013 18:26:24 -0500
To: bug-Module-Rename [...] rt.cpan.org
From: Jim Cochrane <jim.cochrane [...] gmail.com>
Hi Mike. I tested the latest version of Module::Rename and, while I found that the problems addressed by your last set of changes were solved, I tried testing with some somewhat unusual (but not necessarily outrageous, IMO) cases [specifically, small module names - e.g.: a.pm bc.pm], and I hit paydirt :-), in terms of finding some new bugs. In each of the test cases I put together, I believe no match should have been found and no action taken. (I used the -t option; the result would obviously be a lot messier without -t; and I don't think there's any difference between using -g or without -g [except, of course 'mv' vs 'git mv'].) I'm including a tar file with target files and simple scripts to show several cases where problems turn up. I think this should be selfl-explanatory, but let me know if you have questions. I also ran a test case where the target file exists [e.g., 'module-rename -t -g a b lib' where lib/a.pm exists]. This also resulted in incorrect behavior. Such a case is not included in the tar file, but I can put one together easily if you like - just let me know. These commands (with short file/module names) are probably not ones I'd need to use on my current project, but perhaps the problem could show up even with longer file/module names, so I'm hoping this is practical to fix. Thanks! Jim Here's the output from my tests (the same ones included in the tar file): ==> cmd1.out <== Running 'module-rename -t -g a b lib' mv lib/Bar lib/Bbr (skipped - dry run) cd lib/Foo [in /home/development/jtc/projects/mrbugs/bug1/lib/Foo:] tapping git mv Bar.pm Bbr.pm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 ==> cmd2.out <== Running 'module-rename -t -g b c lib' lib/Bar/Ab.pm (1): b => c Ab.pm: 1c1 - package Bar::Ab; + package Bar::Ac; Use of uninitialized value $_[0] in concatenation (.) or string at /usr/local/share/perl5/Sysadm/Install.pm line 534. cd Use of uninitialized value $_[0] in chdir at /usr/local/share/perl5/Sysadm/Install.pm line 547. Use of chdir('') or chdir(undef) as chdir() is deprecated at /usr/local/share/perl5/Sysadm/Install.pm line 547. [in /home/jtc:] tapping git mv lib/Bar/Ab.pm lic/Bar/Ab.pm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 mv lib lic (skipped - dry run) Use of uninitialized value $_[0] in concatenation (.) or string at /usr/local/share/perl5/Sysadm/Install.pm line 534. cd Use of uninitialized value $_[0] in chdir at /usr/local/share/perl5/Sysadm/Install.pm line 547. Use of chdir('') or chdir(undef) as chdir() is deprecated at /usr/local/share/perl5/Sysadm/Install.pm line 547. [in /home/jtc:] tapping git mv lib/Bar/Ab.pm lic/Bar/Ab.pm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 ==> cmd3.out <== Running 'module-rename -t -g p q lib' cd lib [in /home/development/jtc/projects/mrbugs/bug1/lib:] tapping git mv Foo.pm Foo.qm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd lib/Bar [in /home/development/jtc/projects/mrbugs/bug1/lib/Bar:] tapping git mv P.pm P.qm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd lib/Bar [in /home/development/jtc/projects/mrbugs/bug1/lib/Bar:] tapping git mv Ab.pm Ab.qm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd lib/Foo [in /home/development/jtc/projects/mrbugs/bug1/lib/Foo:] tapping git mv Bar.pm Bar.qm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 ==> cmd4.out <== Running 'module-rename -t -g p q' ./cmd4 (4): p => q cmd4: 4c4 - cmd='module-rename -t -g p q' + cmd='module-rename -t -g q q' ./cmd3 (4): p => q cmd3: 4c4 - cmd='module-rename -t -g p q lib' + cmd='module-rename -t -g q q lib' cd ./.git [in /home/development/jtc/projects/mrbugs/bug1/.git:] tapping git mv description descriqtion (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd .git/hooks [in /home/development/jtc/projects/mrbugs/bug1/.git/hooks:] tapping git mv commit-msg.sample commit-msg.samqle (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd .git/hooks [in /home/development/jtc/projects/mrbugs/bug1/.git/hooks:] tapping git mv pre-applypatch.sample qre-applypatch.sample (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd .git/hooks [in /home/development/jtc/projects/mrbugs/bug1/.git/hooks:] tapping git mv post-update.sample qost-update.sample (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd .git/hooks [in /home/development/jtc/projects/mrbugs/bug1/.git/hooks:] tapping git mv pre-commit.sample qre-commit.sample (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd .git/hooks [in /home/development/jtc/projects/mrbugs/bug1/.git/hooks:] tapping git mv prepare-commit-msg.sample qrepare-commit-msg.sample (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd .git/hooks [in /home/development/jtc/projects/mrbugs/bug1/.git/hooks:] tapping git mv update.sample uqdate.sample (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd .git/hooks [in /home/development/jtc/projects/mrbugs/bug1/.git/hooks:] tapping git mv applypatch-msg.sample aqplypatch-msg.sample (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd .git/hooks [in /home/development/jtc/projects/mrbugs/bug1/.git/hooks:] tapping git mv pre-rebase.sample qre-rebase.sample (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 mv ./.git/objects/pack ./.git/objects/qack (skipped - dry run) cd ./lib [in /home/development/jtc/projects/mrbugs/bug1/lib:] tapping git mv Foo.pm Foo.qm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd lib/Bar [in /home/development/jtc/projects/mrbugs/bug1/lib/Bar:] tapping git mv P.pm P.qm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd lib/Bar [in /home/development/jtc/projects/mrbugs/bug1/lib/Bar:] tapping git mv Ab.pm Ab.qm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 cd lib/Foo [in /home/development/jtc/projects/mrbugs/bug1/lib/Foo:] tapping git mv Bar.pm Bar.qm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 ==> cmd5.out <== Running 'module-rename -t -g ar bs lib' lib/Bar/P.pm (1): ar => bs P.pm: 1c1 - package Bar::P; + package Bbs::P; lib/Bar/Ab.pm (1): ar => bs Ab.pm: 1c1 - package Bar::Ab; + package Bbs::Ab; lib/Foo/Bar.pm (1): ar => bs Bar.pm: 1c1 - package Foo::Bar; + package Foo::Bbs; cd lib/Foo [in /home/development/jtc/projects/mrbugs/bug1/lib/Foo:] tapping git mv Bar.pm Bbs.pm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1 mv lib/Bar lib/Bbs (skipped - dry run) cd lib/Foo [in /home/development/jtc/projects/mrbugs/bug1/lib/Foo:] tapping git mv Bar.pm Bbs.pm (skipped - dry run) cdback to /home/development/jtc/projects/mrbugs/bug1 cd /home/development/jtc/projects/mrbugs/bug1
Download mrbugs.tar
application/x-tar 90k

Message body not shown because it is not plain text.