betacentauri has asked for the wisdom of the Perl Monks concerning the following question:

O Monks,

I wish to learn to develop Catalyst applications. I have been trying to complete the minimal Hello World projects coming in some books. While into this, I have been led to install List::MoreUtils. From then on, whenever I run catalyst.pl I get a first line of output saying:

Use of uninitialized value in scalar assignment at /usr/lib/perl5/site +_perl/5.8.8/i386-linux-thread-multi/List/MoreUtils.pm line 24.

As it turns out to be, this has to do with PERL_DL_NONLAZY having no value in $ENV. When I run PERL_DL_NONLAZY=<some value> catalyst.pl <some project> this warning doesn't come out.

Why is this value undefined? What is a sensible value for PERL_DL_NONLAZY when it comes to Catalyst development? Is not having a preset environment value harmful to my applications?

Also, I'd be glad to know about any related online resources such as blogs or fora, carrying information about best practices in Catalyst.

TVMIA

Replies are listed 'Best First'.
Re: Catalyst and PERL_DL_NONLAZY
by ikegami (Patriarch) on Dec 04, 2010 at 17:25 UTC

    What is a sensible value for PERL_DL_NONLAZY when it comes to Catalyst development?

    It should have no effect.

    What version of List::MoreUtils do you have? In 0.26, the line in question is

    local $ENV{PERL_DL_NONLAZY} = $ENV{PERL_DL_NONLAZY} ? 0 : $ENV{PERL_DL +_NONLAZY};

    There no way that should warn. I don't see how an assignment would ever care about undef for either side, even taking into consideration that %ENV is magical. But I guess it's possible unless the error is being misreported. Then again, I don't see any source of warning in the source for scalar assignment in the latest Perl version.

    Maybe something is messing with %ENV? Maybe you're facing a bug in (a rather old version of) Perl? Either way, the problem is not related to the value of PERL_DL_NONLAZY.

Re: Catalyst and PERL_DL_NONLAZY
by chrestomanci (Priest) on Dec 04, 2010 at 10:53 UTC

    If you are looking to learn Catalyst, then your first step should be the excellent Catalyst::Manual::Tutorial. If you do the whole thing including the exercises then you will learn a lot.

    In addition, depending on what you are doing, it might be wise to do some extra study on DBIx::Class and TT2. There are Tutorals and exercise available for them as well.

    I have experienced any problems with PERL_DL_NONLAZY. Have you tried google?