<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Use 'use lib $FindBin::Bin' to append Perl module include path"
   href="https://bugs.webkit.org/show_bug.cgi?id=162256">162256</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Use 'use lib $FindBin::Bin' to append Perl module include path
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Tools / Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>Hironori.Fujii&#64;sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lforschler&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>We need to use '-I' switch to explicitly append Perl module include path to invoke some Perl scripts such like following:

<span class="quote">&gt; COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}</span >

This can be solved by using 'use lib'. 

<span class="quote">&gt; use lib $FindBin::Bin</span >

Documentation: <a href="http://perldoc.perl.org/lib.html">http://perldoc.perl.org/lib.html</a>

Some scripts already do this. For example, build-webkit do that.

  <a href="https://trac.webkit.org/browser/trunk/Tools/Scripts/build-webkit?rev=204444#L41">https://trac.webkit.org/browser/trunk/Tools/Scripts/build-webkit?rev=204444#L41</a>

I'd like to change following script files:

  Source/WebCore/bindings/scripts/generate-bindings.pl
  Source/WebCore/bindings/scripts/preprocess-idls.pl
  Source/WebCore/css/makegrammar.pl
  Source/WebCore/css/makeprop.pl
  Source/WebCore/css/makevalues.pl
  Source/WebCore/dom/make_dom_exceptions.pl
  Source/WebCore/dom/make_event_factory.pl
  Source/WebCore/dom/make_names.pl
  Source/WebCore/page/make_settings.pl</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>