Wednesday, December 18, 2013

ActiveState's Perl Package Manager can't connect (a fix)

Starting a new position at Dell, I found that the website restrictions weren't as Spartan as I remembered them to be (compared to 2010 when I worked there last). Nonetheless, I stubbed my toe when trying to update packages with ActiveState's Perl Package Manager because the low-level proxy information wasn't available system-wide.

The Fix


  1. Determine what your corporate proxy URL is. I did this by downloading the configuration file (see Find the Proxy Info below).
  2. Right-click on your computer icon on the desktop and select Properties (or select the Control Panel -> System via the Start menu); select Advanced system settings.
  3. Click on Environment Variables...
  4. Assuming it doesn't already exist, create a new system variable. 
    1. The Variable name is: http_proxy
    2. The Variable value is:  http://username:password@your.proxy.info
      where username is your actual username
      where password is your password (see Password Note about escaping unusual characters below)
      where your.proxy.info is the canonical name or IP address of your corporate proxy
  5. Click OK and OK to save the values and you should be set.

Password Note

If your password contains anything out of the ordinary (e.g., @, #, !, etc.), you need to use HTML escapes to pass it along. Here's a decent reference to help you get going.

Find the Proxy Info

These instructions are for Chrome on Windows 7. You'll have to figure it out for Internet Explorer, Firefox, Safari, etc.

  1. Under the Chrome "everything" menu widget (the floating label text says Customize and control Google Chrome), select Settings.
  2. Click the small link at the bottom titled Show advanced settings...
  3. Scroll down until you see Network and click Change proxy settings... This will open up the Connections tab of the Internet Properties dialog.
  4. Click on the Settings button.
  5. If the proxy server information is entered in directly - you have the information you need! Otherwise, grab the address from the automatic configuration script, paste it into a blank tab of your browser, and the file will download.
  6. You'll have to parse this file yourself. In my case, I had to wait through all the "if" statements to get to the final "else" which contained the default proxy address at the end.