in reply to How important is 'use constant a => sub {};'

Monks, I was just trying to install CPANPLUS on my hosted shell account, and it errored out because on my particular Linux build, use constant a => sub {}; has problems.
It's hard to believe it is something that gives an error because of "your particular Linux build". It's more likely that you simply have an outdated Perl distro -- I don't have the slightest idea at which time constant.pm made its way through the core modules...

However it's valid Perl and it's a commonly used module, so you may not like it, but you may want to upgrade in any case. Or else, if you're up to date, there may be something broken in your perl system.

Replies are listed 'Best First'.
Re^2: How important is 'use constant a => sub {};'
by dave_the_m (Monsignor) on Oct 06, 2005 at 11:42 UTC
    I don't have the slightest idea at which time constant.pm made its way through the core modules
    Sometime between 5.003_22 and 5.004_05, ie before Apr 1999.

    Dave.

Re^2: How important is 'use constant a => sub {};'
by tphyahoo (Vicar) on Oct 06, 2005 at 13:21 UTC
    Well, if you read the snip from the makefile (see my reply to perl mouse), it seems that this is indeed what the makefile thinks. This perl on that version of linux = bad.
      Ok, now I read it. As far a I'm concerned I may go as far as to say that 'that version of Linux = bad'; but I may also s/=/==/ or s/=/eq/. Whatever, I don't want to start a distro flame war.

      I would have never expected this additional difficulty. I only knew about the well known issues of 5.8.0 under "some" distros due to the ("too") improved unicode support.