Bug 127217

Summary: Tools/Scripts/test-webkitperl fails: 'tempdir' can't be called as a method
Product: WebKit Reporter: Alberto Garcia <berto>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch dbates: review+

Description Alberto Garcia 2014-01-18 06:44:21 PST
[...]
Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl ................................... ok
Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl ............................ 'tempdir' can't be called as a method at Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl line 120.
Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl ............................ Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
Tools/Scripts/webkitperl/VCSUtils_unittest/parseFirstEOL.pl ..................................... ok
[...]

That's because we're calling File::Temp->tempdir() but that's not supporte by the API.
Comment 1 Alberto Garcia 2014-01-18 06:46:03 PST
Created attachment 221544 [details]
Patch
Comment 2 Alberto Garcia 2014-01-18 06:58:25 PST
This used to work in earlier Perl versions (although it was undocumented) but not anymore:

https://github.com/Perl-Toolchain-Gang/File-Temp/commit/c8920b2161ab6900a09e02b9410e0e4c3d74f565
Comment 3 Daniel Bates 2014-01-18 11:54:38 PST
Comment on attachment 221544 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=221544&action=review

Are there any other call sites that use the bad syntax?

> Tools/ChangeLog:8
> +        Call the tempdir() function using the proper syntax.

Although you document the commit that made the old syntax invalid, you may want to consider adding a remark that explains that we were using an undocumented calling convention and that this convention has been explicitly made invalid following <https://github.com/Perl-Toolchain-Gang/File-Temp/commit/c8920b2161ab6900a09e02b9410e0e4c3d74f565>. It would be great if we also documented the version of Perl this change affected.
Comment 4 Alberto Garcia 2014-01-18 15:49:09 PST
(In reply to comment #3)
> Although you document the commit that made the old syntax invalid,
> you may want to consider adding a remark that explains that we were
> using an undocumented calling convention and that this convention
> has been explicitly made invalid following
> <https://github.com/Perl-Toolchain-Gang/File-Temp/commit/c8920b2161ab6900a09e02b9410e0e4c3d74f565>. It
> would be great if we also documented the version of Perl this change
> affected.

Sure, I'll do that. The Perl version is 5.18.0, which included
File::Temp v0.23

http://perldoc.perl.org/perl5180delta.html
Comment 5 Alberto Garcia 2014-01-18 15:55:50 PST
Committed r162283: <http://trac.webkit.org/changeset/162283>
Comment 6 Alberto Garcia 2014-01-18 15:58:24 PST
(In reply to comment #3)
> (From update of attachment 221544 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=221544&action=review
> 
> Are there any other call sites that use the bad syntax?

No, that was the only one.