Bug 21832 - Fix scripts using 'new File::Temp' for Perl 5.10
Summary: Fix scripts using 'new File::Temp' for Perl 5.10
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL: https://lists.webkit.org/pipermail/we...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-23 11:28 PDT by David Kilzer (:ddkilzer)
Modified: 2008-10-23 17:02 PDT (History)
2 users (show)

See Also:


Attachments
Patch v1 (4.69 KB, patch)
2008-10-23 13:56 PDT, David Kilzer (:ddkilzer)
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2008-10-23 11:28:19 PDT
In Perl 5.10, the File::Temp module changed from this method of creating a new object:

    $fh = new File::Temp($template);

To this method:

    $fh = File::Temp->new(TEMPLATE => $template);

The apparent solution to this is to use File::Temp->tempfile() instead per:

http://marc.info/?l=git&m=122089280626625&w=2
Comment 1 David Kilzer (:ddkilzer) 2008-10-23 12:22:59 PDT
These scripts are affected:

JavaScriptCore/pcre/dftables
WebKitTools/Scripts/bisect-builds
WebKitTools/Scripts/sort-Xcode-project-file
Comment 2 David Kilzer (:ddkilzer) 2008-10-23 13:56:21 PDT
Created attachment 24615 [details]
Patch v1

Note that using File::Temp->tempfile() instead of importing tempfile() first causes the template to be ignored, so I imported tempfile() and used it directly.
Comment 3 Sam Weinig 2008-10-23 16:14:40 PDT
Comment on attachment 24615 [details]
Patch v1

Very nice.
Comment 4 David Kilzer (:ddkilzer) 2008-10-23 17:02:25 PDT
Committed r37832

http://trac.webkit.org/changeset/37832