#120 cilly should use $FindBin::RealBin

Feature request
closed-fixed
4
2013-05-30
2010-08-31
Anonymous
No

Just in case one creates a link to the silly perl script inside some other bin directory.

Discussion

  • I am worried to use a non-standard perl module, which might not be installed everywhere. Is there a way to fallback to FindBin::Bin if the module is missing?

    The patch would look like this:

    diff --git a/bin/cilly b/bin/cilly
    index 958c6b5..70471ff 100755
    --- a/bin/cilly
    +++ b/bin/cilly
    @@ -38,9 +38,8 @@
    #
    use strict;
    use Data::Dumper;
    -use FindBin;
    -use lib "$FindBin::Bin";
    -use lib "$FindBin::Bin/../lib"; # The libraries are in the lib directory
    +use FindBin::Real;
    +use lib $FindBin::Real::Bin() . "/../lib"; # The libraries are in the lib directory
    # Read the configuration script
    use CilConfig;

     
    • labels: --> CIL core (parser, visitor, etc)
    • milestone: 494326 --> Feature request
    • priority: 5 --> 4
    • assigned_to: nobody --> kerneis
    • status: open --> open-accepted
     
    • labels: CIL core (parser, visitor, etc) --> CIL core (parser, visitor, etc)
    • status: open-accepted --> closed-fixed
     
  • I finally figured it out. Next CIL release (1.7) should hopefully have a much better perl install script.