-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
t-test error, can't create a temp file #350
Comments
This is interesting, thank you @PhilterPaper. If you have a previous version installed, could you please see if the |
I have 2.13 installed (2.14 upgrade failed). What exactly do you want me to run, and get back to you with? I don't use WWW::Mechanize, but it was pre-installed in Strawberry Perl (Windows) and gives an annoying update failure that I'm reporting. |
I'm sorry about that. Let's see if we can figure this out so we can fix it. I thought it might be something that was broken before, but wasn't covered by a test, and the changes to the test have now uncovered this. But looking at it more, I think that it is the test that causes it. I don't have access to a Windows 10 machine unfortunately, so I've contacted a friend to help me reproduce it.
This sounds like a good assumption. We'll start there. We use Capture::Tiny to get the output from How are you running the update? What command did you run, and as what user? |
I'm using the "cpan" command (Strawberry Perl), getting a list of packages to upgrade, and doing an "upgrade WWW::Mechanize" command. I am the only user of this machine, so I'm running as the only defined user (more or less with 'root' powers -- yeah, potentially it's dangerous, but with care it's doable, and Windows makes it painful to set up multiple users with different privileges like you do in Linux). If your friend can't help with a Windows 10 machine, I would be happy to receive an install package (.tar.gz) from you and manually install it via cpan. Let me know, or if there is anything else I could do to help diagnose this. |
Hi @simbabque , as you had requested, here is my log: Call:
Error output:
|
I have found a discussion on perlmonks that hints at it being the taint mode that we use in that test. I am going to try to move this new subtest into its own file without taint mode. |
It seems that on certain Windows versions File::Temp is not working properly when run under taint mode. This problem must have been around for a while. Test::Output uses File::Temp, and therefore runs into this problem as our mech-dump.t has had the -T flag enabled. I do not know why we run under taint for some tests, but I have decided the most pragmatic fix is to undo my previous changes from #292 to the test an to move this particular test into its own file, which can run without taint. Also see https://www.perlmonks.org/?node_id=1122816 for details on the original problem.
I've pushed a possible fix. @PhilterPaper if it is not too much trouble, I would appreciate if you could clone this repository, check out the branch
I could also push a trial release to PAUSE if that's easier. I've asked @soerenkornetzki to give it a try as well. |
I put a copy on my desktop and ran
Then I ran as you requested:
Is this what you needed? I didn't do anything to update my Perl repository (\Strawberry) -- was I running the previous version or the new one? I can install ( cpan . ) this version into \Strawberry and run again, if I was using the 2.13 version. |
After sending off the previous update, I decided there was no harm in installing that image (using |
This is expected. Just running But that's fine, we know all of those pass.
Yes! Thank you very much. That is all I needed. I'm going to release a new version now.
I'm not sure how you did the installation. I haven't used Please reinstall Mechanize when 2.15 is out.
Or if you prefer the
|
OK, will do on the 2.15 re-install when it comes out, since you say that this is not the final 2.15 (perhaps it should have been 2.14_01 or similar?). The way I installed was to unpack the zip file from GitHub into a desktop directory, cd to the directory, and run |
It seems that on certain Windows versions File::Temp is not working properly when run under taint mode. This problem must have been around for a while. Test::Output uses File::Temp, and therefore runs into this problem as our mech-dump.t has had the -T flag enabled. I do not know why we run under taint for some tests, but I have decided the most pragmatic fix is to undo my previous changes from #292 to the test an to move this particular test into its own file, which can run without taint. Also see https://www.perlmonks.org/?node_id=1122816 for details on the original problem.
I've just pushed 2.15. By the time your day starts, it should be there.
This has to do with how we do releases for most of the modules in the libwww-perl space. We use Dist::Zilla to handle releases, and the versioning happens automatically. After every release, the version is bumped. So the codebase will now have 2.16 right after the 2.15 release. When you installed from code, you just had a snapshot of a branch (that wasn't merged to master yet), but it would still have had the bump to be the next version. Anyway, thank you for reporting this and for helping us solve it! |
Just for the benefit of anyone reading this, I was suggesting that they use 2.14_01 for an intermediate (test) version between 2.14 and 2.15, as it permits the "real" 2.15 to overwrite the 2.14_01 when it's released. A lot of distributions do that, but if their build/distribution tools don't easily permit it, that's life, I guess. Anyway, the official 2.15 cleanly (force) installed on 5.24, 5.26, and 5.32; so I'm happy. Thanks again! |
WWW::Mechanize 2.14 on Windows 10, Strawberry Perl 5.24, 5.26, and 5.32
Possibly you're trying to create a temp file in root (\), which isn't permitted? I wouldn't be surprised if that also failed in Unixy systems.
The text was updated successfully, but these errors were encountered: