in reply to Installing PAR

I've recently started using Cava Packager which seems to work quite well.


True laziness is hard work

Replies are listed 'Best First'.
Re^2: Installing PAR
by samuelalfred (Sexton) on Feb 27, 2009 at 09:21 UTC
    Thanks for the tip. I tried it and it does work quite well. However, I have one problem with it. In my code I find out the current path by using the following command:

    (my $path = $0) =~ s/\\^\\+$//;

    This works fine in the ordinary script but when Cava has made an executable of it the path is equal to "-e". Anyone who knows a way to get the path that is consistent also after Cava has done its work?

    Thanks!

      Given that you are running the script under Windows you can:

      use Win32; my $path = Win32::GetCwd();

      which gives the current directory when the script is executed. That may not be the same as the directory containing the script of course.


      True laziness is hard work