<html>#2303: user FindBin perl module to find lib/sbin, remove use of ENV to pass around global variables
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>enhancement</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>Currently the scripts in lib/sbin assume that they are called from the Cactus root directory and assume that “$PWD/lib/sbin” is the location of the perl modules and scripts.</p>
<p>Since the scripts themselves reside in there, a better way is to use Perl’s FindBin module which let’s one find the location of the current script.</p>
<p>Further this lets one avoid using ENV{“TOP”} to pass around the Cactus root only to find “lib/sbin” inside of it or to find the piraha “.peg” files (which are located i “lib/sbin/../src/peg/”.</p>
<p>The pull request is here:</p>
<p><a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/pull-requests/69/rhaas-perl-inc/diff" rel="nofollow">https://bitbucket.org/cactuscode/cactus/pull-requests/69/rhaas-perl-inc/diff</a></p>
<p>It is rather long so it may be best to have a look at the individual commits:</p>
<p><a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/pull-requests/69/rhaas-perl-inc/commits" rel="nofollow">https://bitbucket.org/cactuscode/cactus/pull-requests/69/rhaas-perl-inc/commits</a></p>
<p>which try to group the chances into logical pieces.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2303/user-findbin-perl-module-to-find-lib-sbin'>https://bitbucket.org/einsteintoolkit/tickets/issues/2303/user-findbin-perl-module-to-find-lib-sbin</a></p>
</html>