Changeset 90664 in webkit


Ignore:
Timestamp:
Jul 8, 2011 1:58:44 PM (13 years ago)
Author:
Adam Roben
Message:

Remove commit-log-editor's dependency on Module::Load::Conditional

This module isn't available in Perl 5.8.8 (the version used on Leopard).

Fixes <http://webkit.org/b/64198> REGRESSION (r90583):
webkitpy.common.checkout.checkout_unittest failing on Leopard

Reviewed by Daniel Bates.

  • Scripts/commit-log-editor: Use the new loadTermReadKey() function instead of

Module::Load::Conditional::can_load.
(loadTermReadKey): Added. Tries to load Term::ReadKey and returns true if it's successful.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90659 r90664  
     12011-07-08  Adam Roben  <aroben@apple.com>
     2
     3        Remove commit-log-editor's dependency on Module::Load::Conditional
     4
     5        This module isn't available in Perl 5.8.8 (the version used on Leopard).
     6
     7        Fixes <http://webkit.org/b/64198> REGRESSION (r90583):
     8        webkitpy.common.checkout.checkout_unittest failing on Leopard
     9
     10        Reviewed by Daniel Bates.
     11
     12        * Scripts/commit-log-editor: Use the new loadTermReadKey() function instead of
     13        Module::Load::Conditional::can_load.
     14        (loadTermReadKey): Added. Tries to load Term::ReadKey and returns true if it's successful.
     15
    1162011-07-08  Adam Roben  <aroben@apple.com>
    217
  • trunk/Tools/Scripts/commit-log-editor

    r90632 r90664  
    3535use File::Spec;
    3636use FindBin;
    37 use Module::Load::Conditional qw(can_load);
    3837use lib $FindBin::Bin;
    3938use VCSUtils;
     
    4241sub createCommitMessage(@);
    4342sub fixEnvironment();
     43sub loadTermReadKey();
    4444sub normalizeLineEndings($$);
    4545sub patchAuthorshipString($$$);
     
    159159
    160160my $keepExistingLog = 1;
    161 if ($regenerateLog && $existingLog && scalar(@changeLogs) > 0 && can_load(modules=>{ 'Term::ReadKey'=>undef })) {
     161if ($regenerateLog && $existingLog && scalar(@changeLogs) > 0 && loadTermReadKey()) {
    162162    print "Existing log message detected, Use 'r' to regenerate log message from ChangeLogs, or any other key to keep the existing message.\n";
    163163    Term::ReadKey::ReadMode('cbreak');
     
    333333}
    334334
     335sub loadTermReadKey()
     336{
     337    eval { require Term::ReadKey; };
     338    return !$@;
     339}
     340
    335341sub normalizeLineEndings($$)
    336342{
Note: See TracChangeset for help on using the changeset viewer.