2

I need to work on a Perl script that has some tasks, like reading/writing Excel sheets, connection to an Oracle database, etc.

First I used ActivePerl. On installing modules, ActivePerl threw an error:

Authorization required 401

(I.e., it requires a business licence for adding modules.)

Then I tried the same with Strawberry Perl, but I still could not install.

What I have tried:

  1. CPAN
  2. ppm
  3. Download a module and install using it nmake
  4. Install modules using the Padre Perl IDE.

Is this a license issue? Or am I missing something here? Is Perl a free distribution for development?

The image shows installing DBD::Oracle on Strawberry Perl v5.22.0:

Enter image description here

brian d foy
  • 129,424
  • 31
  • 207
  • 592
Murali Uppangala
  • 884
  • 6
  • 22
  • 49
  • 1
    I've installed modules without problems on both ActiveState Perl and Strawberry Perl. I don't know if there even is a business license for ActiveState Perl (there definitely isn't one for Strawberry). That sounds more like a proxy problem or something. – melpomene Oct 21 '15 at 07:51
  • What happens when you try to install modules in strawberry with cpan? – ysth Oct 21 '15 at 12:03
  • 1
    That error means you're not connecting to CPAN. Check your proxy settings – Sobrique Oct 21 '15 at 13:22
  • how to check proxy setting? is that perl module installation specific? – Murali Uppangala Oct 21 '15 at 13:32
  • 2
    It means that for some reason - you're host is not able to directly reach the internet. The most common reason for this is that you're going through a proxy server to reach it from a corporate/campus network. Look in your browser settings and you should see something that tells you what they are. Then set this via `o conf http_proxy` in your CPAN shell. – Sobrique Oct 21 '15 at 15:13
  • 1
    @melpomene, AS only provides AS-built packages for free to the two most recent versions of Perl. Doesn't stop you from using `ppm` to install packages built by anyone else, or from using `cpan`. But yeah, the problem he's now experiencing is a lack of access to the internet. – ikegami Oct 21 '15 at 18:29
  • Yes that was a proxy settings problem!!. I did copy those packages zfrom different machine where all needed packages installed. Just works fine. – Murali Uppangala Oct 23 '15 at 04:16

3 Answers3

2

It looks like you are using Strawberry Perl. That requires no license or other special steps to use. It's ready to go.

One of the top lines of output in your picture is "Can't connect to cpan.strawberryperl.com:80". It then tries to connect to other sites and has the same failure. It looks like a network issue.

brian d foy
  • 129,424
  • 31
  • 207
  • 592
1

The community edition of ActivePerl provides support to only the latest versions of Perl, and access to the packages ActiveState built for older versions is available in Business and Enterprise edition.

If you install Perl 5.18.4, 5.20.2 or 5.22.0 then you'll not get a 401 error.

Alternate solution: Use CPAN instead of ppm to install Perl modules.

See more at: Download and Install Perl: ActivePerl

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133
1

ActiveState is a commercial company. They release a community edition, but they make money from support. Part of that means they only offer "free" the newest versions. Which is why you get the error you do - upgrade to a newer Perl, and they'll let you update.

More broadly - technically each module can be licensed separately. There's no requirement to release Perl code (including modules) under any sort of FLOSS license.

However, bear in mind that the ActiveState community edition isn't the same license as CPAN modules would be. CPAN modules are "Mostly GNU". But ActiveState CE has some additional terms.

For example,

The use of the Software is unsupported and is for non-commercial or non-production use.

You should make a point of reviewing licenses, because it really is a bit of a minefield if you're not careful.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sobrique
  • 52,974
  • 7
  • 60
  • 101