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

The fact that
use constant a => sub {};
has problems is a big deal. Because it's correct syntax, and if something with correct syntax has "problems" (whatever they are), something is rotten.

But without telling us what the "problems" are, we can offer no guidance in solving it.

It's not a Unix thing though.

Perl --((8:>*

Replies are listed 'Best First'.
Re^2: How important is 'use constant a => sub {};'
by tphyahoo (Vicar) on Oct 06, 2005 at 13:19 UTC
    Well, the CPANPLUS makefile says it is a unix thing, kind of -- something particular to the default perl installed with this redhat distro. From the second node I linked:
    ### there's issues with redhat 9.0's stock perl -- they applied some ### custom patches on their 5.8.0 and it breaks use constant a => sub +{}; if( $^O eq 'linux' and -e '/etc/redhat-release' and $] == '5.008' and (grep /Red Hat, Inc/, values %Config::Config) ) { print loc(" ### IMPORTANT! ###################################################### You are using perl $] supplied by RedHat, who have applied custom patches that break various perl modules, including this one. You will have to migrate to a perl without these flaws. You could do this for example by building a perl installation by hand. You can obtain the sources from www.cpan.org. We're sorry for the inconvenience. ##################################################################### ") . $/; require 5.008001; }
    I guess I could comment that out of the makefile and see if I get something usable... but nah, I'm going to let this alone for now.