On 08/14/2018 03:48 AM, Timo Paulssen wrote:
Please be aware that passing a folder with many files in it as the -I
path will cause a tremendous slowdown when loading modules, since it
goes through the whole file hierarchy starting at that path. If
/home/linuxutil is actually a typical home folder with dotfiles and
documents and what have you, that can take a *long* while.

Oh ya,

It is not really an issue for me as I onlyt use the command line (one lines) to test things. I had just added "CurlExists" to my CurlUtils
module.  This is what you helped me test:


sub CurlExists( $Url ) is export {
   # $Url is the name of the web file to download
        #
        # return the web page as a string and curl's exit code (0 = good)

    if not $Url {
      PrintRedErr( "CurlExists error:\n\tUrl <$Url>\n\n" );
      return 0;
   }

   return not RunNoShellCode( "curl --fail --head  $Url" );
}


$ perl6 -I./ -MCurlUtils -e 'if CurlExists( "gbisss.com" ) {say "exists";}else{say "does not exist";}'
does not exist

$ perl6 -I./ -MCurlUtils -e 'if CurlExists( "gbis.com" ) {say "exists";}else{say "does not exist";}'
exists

Reply via email to